Lines Matching refs:size

80 	void* (*alloc)(struct device *dev, size_t size,
83 void (*free)(struct device *dev, size_t size,
94 unsigned long offset, size_t size,
98 size_t size, enum dma_data_direction dir,
112 size_t size, enum dma_data_direction dir,
115 size_t size, enum dma_data_direction dir,
118 dma_addr_t dma_handle, size_t size,
121 dma_addr_t dma_handle, size_t size,
129 void (*cache_sync)(struct device *dev, void *vaddr, size_t size,
163 int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size,
168 void *cpu_addr, size_t size, int *ret);
170 void *dma_alloc_from_global_coherent(ssize_t size, dma_addr_t *dma_handle);
173 size_t size, int *ret);
176 #define dma_alloc_from_dev_coherent(dev, size, handle, ret) (0) argument
180 static inline void *dma_alloc_from_global_coherent(ssize_t size, in dma_alloc_from_global_coherent() argument
192 void *cpu_addr, size_t size, in dma_mmap_from_global_coherent() argument
227 size_t size, in dma_map_single_attrs() argument
236 offset_in_page(ptr), size, in dma_map_single_attrs()
239 offset_in_page(ptr), size, in dma_map_single_attrs()
245 size_t size, in dma_unmap_single_attrs() argument
253 ops->unmap_page(dev, addr, size, dir, attrs); in dma_unmap_single_attrs()
254 debug_dma_unmap_page(dev, addr, size, dir, true); in dma_unmap_single_attrs()
290 size_t offset, size_t size, in dma_map_page_attrs() argument
298 addr = ops->map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
299 debug_dma_map_page(dev, page, offset, size, dir, addr, false); in dma_map_page_attrs()
305 dma_addr_t addr, size_t size, in dma_unmap_page_attrs() argument
313 ops->unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
314 debug_dma_unmap_page(dev, addr, size, dir, false); in dma_unmap_page_attrs()
319 size_t size, in dma_map_resource() argument
333 addr = ops->map_resource(dev, phys_addr, size, dir, attrs); in dma_map_resource()
335 debug_dma_map_resource(dev, phys_addr, size, dir, addr); in dma_map_resource()
341 size_t size, enum dma_data_direction dir, in dma_unmap_resource() argument
348 ops->unmap_resource(dev, addr, size, dir, attrs); in dma_unmap_resource()
349 debug_dma_unmap_resource(dev, addr, size, dir); in dma_unmap_resource()
353 size_t size, in dma_sync_single_for_cpu() argument
360 ops->sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
361 debug_dma_sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
365 dma_addr_t addr, size_t size, in dma_sync_single_for_device() argument
372 ops->sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
373 debug_dma_sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
379 size_t size, in dma_sync_single_range_for_cpu() argument
386 ops->sync_single_for_cpu(dev, addr + offset, size, dir); in dma_sync_single_range_for_cpu()
387 debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); in dma_sync_single_range_for_cpu()
393 size_t size, in dma_sync_single_range_for_device() argument
400 ops->sync_single_for_device(dev, addr + offset, size, dir); in dma_sync_single_range_for_device()
401 debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); in dma_sync_single_range_for_device()
437 dma_cache_sync(struct device *dev, void *vaddr, size_t size, in dma_cache_sync() argument
444 ops->cache_sync(dev, vaddr, size, dir); in dma_cache_sync()
448 void *cpu_addr, dma_addr_t dma_addr, size_t size);
450 void *dma_common_contiguous_remap(struct page *page, size_t size,
454 void *dma_common_pages_remap(struct page **pages, size_t size,
457 void dma_common_free_remap(void *cpu_addr, size_t size, unsigned long vm_flags);
474 dma_addr_t dma_addr, size_t size, unsigned long attrs) in dma_mmap_attrs() argument
479 return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in dma_mmap_attrs()
480 return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); in dma_mmap_attrs()
487 void *cpu_addr, dma_addr_t dma_addr, size_t size);
491 dma_addr_t dma_addr, size_t size, in dma_get_sgtable_attrs() argument
497 return ops->get_sgtable(dev, sgt, cpu_addr, dma_addr, size, in dma_get_sgtable_attrs()
499 return dma_common_get_sgtable(dev, sgt, cpu_addr, dma_addr, size); in dma_get_sgtable_attrs()
508 static inline void *dma_alloc_attrs(struct device *dev, size_t size, in dma_alloc_attrs() argument
518 if (dma_alloc_from_dev_coherent(dev, size, dma_handle, &cpu_addr)) in dma_alloc_attrs()
529 cpu_addr = ops->alloc(dev, size, dma_handle, flag, attrs); in dma_alloc_attrs()
530 debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); in dma_alloc_attrs()
534 static inline void dma_free_attrs(struct device *dev, size_t size, in dma_free_attrs() argument
542 if (dma_release_from_dev_coherent(dev, get_order(size), cpu_addr)) in dma_free_attrs()
556 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); in dma_free_attrs()
557 ops->free(dev, size, cpu_addr, dma_handle, attrs); in dma_free_attrs()
560 static inline void *dma_alloc_coherent(struct device *dev, size_t size, in dma_alloc_coherent() argument
563 return dma_alloc_attrs(dev, size, dma_handle, flag, 0); in dma_alloc_coherent()
566 static inline void dma_free_coherent(struct device *dev, size_t size, in dma_free_coherent() argument
569 return dma_free_attrs(dev, size, cpu_addr, dma_handle, 0); in dma_free_coherent()
662 u64 size, const struct iommu_ops *iommu, in arch_setup_dma_ops() argument
677 static inline int dma_set_max_seg_size(struct device *dev, unsigned int size) in dma_set_max_seg_size() argument
680 dev->dma_parms->max_segment_size = size; in dma_set_max_seg_size()
709 static inline void *dma_zalloc_coherent(struct device *dev, size_t size, in dma_zalloc_coherent() argument
712 void *ret = dma_alloc_coherent(dev, size, dma_handle, in dma_zalloc_coherent()
730 dma_addr_t device_addr, size_t size, int flags);
733 dma_addr_t device_addr, size_t size);
737 dma_addr_t device_addr, size_t size, int flags) in dma_declare_coherent_memory() argument
749 dma_addr_t device_addr, size_t size) in dma_mark_declared_memory_occupied() argument
771 extern void *dmam_alloc_coherent(struct device *dev, size_t size,
773 extern void dmam_free_coherent(struct device *dev, size_t size, void *vaddr,
776 static inline void *dmam_alloc_coherent(struct device *dev, size_t size, in dmam_alloc_coherent() argument
779 static inline void dmam_free_coherent(struct device *dev, size_t size, in dmam_free_coherent() argument
783 extern void *dmam_alloc_attrs(struct device *dev, size_t size,
789 dma_addr_t device_addr, size_t size,
795 size_t size, gfp_t gfp) in dmam_declare_coherent_memory() argument
805 static inline void *dma_alloc_wc(struct device *dev, size_t size, in dma_alloc_wc() argument
808 return dma_alloc_attrs(dev, size, dma_addr, gfp, in dma_alloc_wc()
815 static inline void dma_free_wc(struct device *dev, size_t size, in dma_free_wc() argument
818 return dma_free_attrs(dev, size, cpu_addr, dma_addr, in dma_free_wc()
828 size_t size) in dma_mmap_wc() argument
830 return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, in dma_mmap_wc()