Lines Matching refs:cpu_addr
54 void *cpu_addr; member
425 void *cpu_addr, size_t size, bool want_vaddr) in __free_from_contiguous() argument
429 dma_common_free_remap(cpu_addr, size); in __free_from_contiguous()
485 __free_from_contiguous(args->dev, args->page, args->cpu_addr, in cma_allocator_free()
502 __free_from_pool(args->cpu_addr, args->size); in pool_allocator_free()
521 dma_common_free_remap(args->cpu_addr, args->size); in remap_allocator_free()
611 static void __arm_dma_free(struct device *dev, size_t size, void *cpu_addr, in __arm_dma_free() argument
620 .cpu_addr = cpu_addr, in __arm_dma_free()
625 buf = arm_dma_buffer_find(cpu_addr); in __arm_dma_free()
626 if (WARN(!buf, "Freeing invalid buffer %p\n", cpu_addr)) in __arm_dma_free()
1035 static struct page **__iommu_get_pages(void *cpu_addr, unsigned long attrs) in __iommu_get_pages() argument
1037 if (__in_atomic_pool(cpu_addr, PAGE_SIZE)) in __iommu_get_pages()
1038 return __atomic_get_pages(cpu_addr); in __iommu_get_pages()
1041 return cpu_addr; in __iommu_get_pages()
1043 return dma_common_find_pages(cpu_addr); in __iommu_get_pages()
1071 static void __iommu_free_atomic(struct device *dev, void *cpu_addr, in __iommu_free_atomic() argument
1076 __dma_free_buffer(virt_to_page(cpu_addr), size); in __iommu_free_atomic()
1078 __free_from_pool(cpu_addr, size); in __iommu_free_atomic()
1131 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_iommu_mmap_attrs() argument
1134 struct page **pages = __iommu_get_pages(cpu_addr, attrs); in arm_iommu_mmap_attrs()
1158 static void arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr, in arm_iommu_free_attrs() argument
1165 if (coherent_flag == COHERENT || __in_atomic_pool(cpu_addr, size)) { in arm_iommu_free_attrs()
1166 __iommu_free_atomic(dev, cpu_addr, handle, size, coherent_flag); in arm_iommu_free_attrs()
1170 pages = __iommu_get_pages(cpu_addr, attrs); in arm_iommu_free_attrs()
1172 WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr); in arm_iommu_free_attrs()
1177 dma_common_free_remap(cpu_addr, size); in arm_iommu_free_attrs()
1184 void *cpu_addr, dma_addr_t dma_addr, in arm_iommu_get_sgtable() argument
1188 struct page **pages = __iommu_get_pages(cpu_addr, attrs); in arm_iommu_get_sgtable()
1828 void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, in arch_dma_free() argument
1831 __arm_dma_free(dev, size, cpu_addr, dma_handle, attrs, false); in arch_dma_free()