Lines Matching refs:size
24 extern void *dma_direct_alloc_coherent(struct device *dev, size_t size,
27 extern void dma_direct_free_coherent(struct device *dev, size_t size,
33 size_t size, struct dma_attrs *attrs);
44 extern void *__dma_alloc_coherent(struct device *dev, size_t size,
46 extern void __dma_free_coherent(size_t size, void *vaddr);
47 extern void __dma_sync(void *vaddr, size_t size, int direction);
49 size_t size, int direction);
57 #define __dma_alloc_coherent(dev, gfp, size, handle) NULL argument
58 #define __dma_free_coherent(size, addr) ((void)0) argument
59 #define __dma_sync(addr, size, rw) ((void)0) argument
142 static inline void *dma_alloc_attrs(struct device *dev, size_t size, in dma_alloc_attrs() argument
151 cpu_addr = dma_ops->alloc(dev, size, dma_handle, flag, attrs); in dma_alloc_attrs()
153 debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); in dma_alloc_attrs()
160 static inline void dma_free_attrs(struct device *dev, size_t size, in dma_free_attrs() argument
168 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); in dma_free_attrs()
170 dma_ops->free(dev, size, cpu_addr, dma_handle, attrs); in dma_free_attrs()
188 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) in dma_capable() argument
193 if (sd->max_direct_dma_addr && addr + size > sd->max_direct_dma_addr) in dma_capable()
200 return addr + size - 1 <= *dev->dma_mask; in dma_capable()
218 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, in dma_cache_sync() argument
222 __dma_sync(vaddr, size, (int)direction); in dma_cache_sync()