Lines Matching refs:cpu_addr

1367 static void __iommu_dma_free(struct device *dev, size_t size, void *cpu_addr)  in __iommu_dma_free()  argument
1375 dma_free_from_pool(dev, cpu_addr, alloc_size)) in __iommu_dma_free()
1378 if (is_vmalloc_addr(cpu_addr)) { in __iommu_dma_free()
1383 pages = dma_common_find_pages(cpu_addr); in __iommu_dma_free()
1385 page = vmalloc_to_page(cpu_addr); in __iommu_dma_free()
1386 dma_common_free_remap(cpu_addr, alloc_size); in __iommu_dma_free()
1389 page = virt_to_page(cpu_addr); in __iommu_dma_free()
1398 static void iommu_dma_free(struct device *dev, size_t size, void *cpu_addr, in iommu_dma_free() argument
1402 __iommu_dma_free(dev, size, cpu_addr); in iommu_dma_free()
1412 void *cpu_addr; in iommu_dma_alloc_pages() local
1423 cpu_addr = dma_common_contiguous_remap(page, alloc_size, in iommu_dma_alloc_pages()
1425 if (!cpu_addr) in iommu_dma_alloc_pages()
1431 cpu_addr = page_address(page); in iommu_dma_alloc_pages()
1435 memset(cpu_addr, 0, alloc_size); in iommu_dma_alloc_pages()
1436 return cpu_addr; in iommu_dma_alloc_pages()
1448 void *cpu_addr; in iommu_dma_alloc() local
1460 page = dma_alloc_from_pool(dev, PAGE_ALIGN(size), &cpu_addr, in iommu_dma_alloc()
1463 cpu_addr = iommu_dma_alloc_pages(dev, size, &page, gfp, attrs); in iommu_dma_alloc()
1464 if (!cpu_addr) in iommu_dma_alloc()
1470 __iommu_dma_free(dev, size, cpu_addr); in iommu_dma_alloc()
1474 return cpu_addr; in iommu_dma_alloc()
1478 void *cpu_addr, dma_addr_t dma_addr, size_t size, in iommu_dma_mmap() argument
1487 if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret)) in iommu_dma_mmap()
1493 if (is_vmalloc_addr(cpu_addr)) { in iommu_dma_mmap()
1494 struct page **pages = dma_common_find_pages(cpu_addr); in iommu_dma_mmap()
1498 pfn = vmalloc_to_pfn(cpu_addr); in iommu_dma_mmap()
1500 pfn = page_to_pfn(virt_to_page(cpu_addr)); in iommu_dma_mmap()
1509 void *cpu_addr, dma_addr_t dma_addr, size_t size, in iommu_dma_get_sgtable() argument
1515 if (is_vmalloc_addr(cpu_addr)) { in iommu_dma_get_sgtable()
1516 struct page **pages = dma_common_find_pages(cpu_addr); in iommu_dma_get_sgtable()
1524 page = vmalloc_to_page(cpu_addr); in iommu_dma_get_sgtable()
1526 page = virt_to_page(cpu_addr); in iommu_dma_get_sgtable()