Lines Matching refs:size
17 int size; member
39 dma_addr_t device_addr, size_t size, bool use_dma_pfn_offset) in dma_init_coherent_memory() argument
42 int pages = size >> PAGE_SHIFT; in dma_init_coherent_memory()
45 if (!size) in dma_init_coherent_memory()
48 mem_base = memremap(phys_addr, size, MEMREMAP_WC); in dma_init_coherent_memory()
62 dma_mem->size = pages; in dma_init_coherent_memory()
73 &phys_addr, size / SZ_1M); in dma_init_coherent_memory()
118 dma_addr_t device_addr, size_t size) in dma_declare_coherent_memory() argument
123 mem = dma_init_coherent_memory(phys_addr, device_addr, size, false); in dma_declare_coherent_memory()
143 ssize_t size, dma_addr_t *dma_handle) in __dma_alloc_from_coherent() argument
145 int order = get_order(size); in __dma_alloc_from_coherent()
152 if (unlikely(size > ((dma_addr_t)mem->size << PAGE_SHIFT))) in __dma_alloc_from_coherent()
155 pageno = bitmap_find_free_region(mem->bitmap, mem->size, order); in __dma_alloc_from_coherent()
166 memset(ret, 0, size); in __dma_alloc_from_coherent()
187 int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size, in dma_alloc_from_dev_coherent() argument
195 *ret = __dma_alloc_from_coherent(dev, mem, size, dma_handle); in dma_alloc_from_dev_coherent()
203 (mem->virt_base + ((dma_addr_t)mem->size << PAGE_SHIFT))) { in __dma_release_from_coherent()
235 struct vm_area_struct *vma, void *vaddr, size_t size, int *ret) in __dma_mmap_from_coherent() argument
237 if (mem && vaddr >= mem->virt_base && vaddr + size <= in __dma_mmap_from_coherent()
238 (mem->virt_base + ((dma_addr_t)mem->size << PAGE_SHIFT))) { in __dma_mmap_from_coherent()
242 int count = PAGE_ALIGN(size) >> PAGE_SHIFT; in __dma_mmap_from_coherent()
272 void *vaddr, size_t size, int *ret) in dma_mmap_from_dev_coherent() argument
276 return __dma_mmap_from_coherent(mem, vma, vaddr, size, ret); in dma_mmap_from_dev_coherent()
282 void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size, in dma_alloc_from_global_coherent() argument
288 return __dma_alloc_from_coherent(dev, dma_coherent_default_memory, size, in dma_alloc_from_global_coherent()
302 size_t size, int *ret) in dma_mmap_from_global_coherent() argument
308 vaddr, size, ret); in dma_mmap_from_global_coherent()
311 int dma_init_global_coherent(phys_addr_t phys_addr, size_t size) in dma_init_global_coherent() argument
315 mem = dma_init_coherent_memory(phys_addr, phys_addr, size, true); in dma_init_global_coherent()
342 rmem->size, true); in rmem_dma_device_init()
387 &rmem->base, (unsigned long)rmem->size / SZ_1M); in rmem_dma_setup()
397 dma_reserved_default_memory->size); in dma_init_reserved_memory()