Lines Matching refs:dir

148 		size_t offset, size_t size, enum dma_data_direction dir,  in dma_map_page_attrs()  argument
154 BUG_ON(!valid_dma_direction(dir)); in dma_map_page_attrs()
161 addr = dma_direct_map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
163 addr = ops->map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
164 kmsan_handle_dma(page, offset, size, dir); in dma_map_page_attrs()
165 debug_dma_map_page(dev, page, offset, size, dir, addr, attrs); in dma_map_page_attrs()
172 enum dma_data_direction dir, unsigned long attrs) in dma_unmap_page_attrs() argument
176 BUG_ON(!valid_dma_direction(dir)); in dma_unmap_page_attrs()
179 dma_direct_unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
181 ops->unmap_page(dev, addr, size, dir, attrs); in dma_unmap_page_attrs()
182 debug_dma_unmap_page(dev, addr, size, dir); in dma_unmap_page_attrs()
187 int nents, enum dma_data_direction dir, unsigned long attrs) in __dma_map_sg_attrs() argument
192 BUG_ON(!valid_dma_direction(dir)); in __dma_map_sg_attrs()
199 ents = dma_direct_map_sg(dev, sg, nents, dir, attrs); in __dma_map_sg_attrs()
201 ents = ops->map_sg(dev, sg, nents, dir, attrs); in __dma_map_sg_attrs()
204 kmsan_handle_dma_sg(sg, nents, dir); in __dma_map_sg_attrs()
205 debug_dma_map_sg(dev, sg, nents, ents, dir, attrs); in __dma_map_sg_attrs()
232 int nents, enum dma_data_direction dir, unsigned long attrs) in dma_map_sg_attrs() argument
236 ret = __dma_map_sg_attrs(dev, sg, nents, dir, attrs); in dma_map_sg_attrs()
271 enum dma_data_direction dir, unsigned long attrs) in dma_map_sgtable() argument
275 nents = __dma_map_sg_attrs(dev, sgt->sgl, sgt->orig_nents, dir, attrs); in dma_map_sgtable()
284 int nents, enum dma_data_direction dir, in dma_unmap_sg_attrs() argument
289 BUG_ON(!valid_dma_direction(dir)); in dma_unmap_sg_attrs()
290 debug_dma_unmap_sg(dev, sg, nents, dir); in dma_unmap_sg_attrs()
293 dma_direct_unmap_sg(dev, sg, nents, dir, attrs); in dma_unmap_sg_attrs()
295 ops->unmap_sg(dev, sg, nents, dir, attrs); in dma_unmap_sg_attrs()
300 size_t size, enum dma_data_direction dir, unsigned long attrs) in dma_map_resource() argument
305 BUG_ON(!valid_dma_direction(dir)); in dma_map_resource()
311 addr = dma_direct_map_resource(dev, phys_addr, size, dir, attrs); in dma_map_resource()
313 addr = ops->map_resource(dev, phys_addr, size, dir, attrs); in dma_map_resource()
315 debug_dma_map_resource(dev, phys_addr, size, dir, addr, attrs); in dma_map_resource()
321 enum dma_data_direction dir, unsigned long attrs) in dma_unmap_resource() argument
325 BUG_ON(!valid_dma_direction(dir)); in dma_unmap_resource()
327 ops->unmap_resource(dev, addr, size, dir, attrs); in dma_unmap_resource()
328 debug_dma_unmap_resource(dev, addr, size, dir); in dma_unmap_resource()
333 enum dma_data_direction dir) in dma_sync_single_for_cpu() argument
337 BUG_ON(!valid_dma_direction(dir)); in dma_sync_single_for_cpu()
339 dma_direct_sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
341 ops->sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
342 debug_dma_sync_single_for_cpu(dev, addr, size, dir); in dma_sync_single_for_cpu()
347 size_t size, enum dma_data_direction dir) in dma_sync_single_for_device() argument
351 BUG_ON(!valid_dma_direction(dir)); in dma_sync_single_for_device()
353 dma_direct_sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
355 ops->sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
356 debug_dma_sync_single_for_device(dev, addr, size, dir); in dma_sync_single_for_device()
361 int nelems, enum dma_data_direction dir) in dma_sync_sg_for_cpu() argument
365 BUG_ON(!valid_dma_direction(dir)); in dma_sync_sg_for_cpu()
367 dma_direct_sync_sg_for_cpu(dev, sg, nelems, dir); in dma_sync_sg_for_cpu()
369 ops->sync_sg_for_cpu(dev, sg, nelems, dir); in dma_sync_sg_for_cpu()
370 debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir); in dma_sync_sg_for_cpu()
375 int nelems, enum dma_data_direction dir) in dma_sync_sg_for_device() argument
379 BUG_ON(!valid_dma_direction(dir)); in dma_sync_sg_for_device()
381 dma_direct_sync_sg_for_device(dev, sg, nelems, dir); in dma_sync_sg_for_device()
383 ops->sync_sg_for_device(dev, sg, nelems, dir); in dma_sync_sg_for_device()
384 debug_dma_sync_sg_for_device(dev, sg, nelems, dir); in dma_sync_sg_for_device()
559 dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp) in __dma_alloc_pages() argument
572 return dma_direct_alloc_pages(dev, size, dma_handle, dir, gfp); in __dma_alloc_pages()
575 return ops->alloc_pages(dev, size, dma_handle, dir, gfp); in __dma_alloc_pages()
579 dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp) in dma_alloc_pages() argument
581 struct page *page = __dma_alloc_pages(dev, size, dma_handle, dir, gfp); in dma_alloc_pages()
584 debug_dma_map_page(dev, page, 0, size, dir, *dma_handle, 0); in dma_alloc_pages()
590 dma_addr_t dma_handle, enum dma_data_direction dir) in __dma_free_pages() argument
596 dma_direct_free_pages(dev, size, page, dma_handle, dir); in __dma_free_pages()
598 ops->free_pages(dev, size, page, dma_handle, dir); in __dma_free_pages()
602 dma_addr_t dma_handle, enum dma_data_direction dir) in dma_free_pages() argument
604 debug_dma_unmap_page(dev, dma_handle, size, dir); in dma_free_pages()
605 __dma_free_pages(dev, size, page, dma_handle, dir); in dma_free_pages()
623 enum dma_data_direction dir, gfp_t gfp) in alloc_single_sgt() argument
633 page = __dma_alloc_pages(dev, size, &sgt->sgl->dma_address, dir, gfp); in alloc_single_sgt()
647 enum dma_data_direction dir, gfp_t gfp, unsigned long attrs) in dma_alloc_noncontiguous() argument
658 sgt = ops->alloc_noncontiguous(dev, size, dir, gfp, attrs); in dma_alloc_noncontiguous()
660 sgt = alloc_single_sgt(dev, size, dir, gfp); in dma_alloc_noncontiguous()
664 debug_dma_map_sg(dev, sgt->sgl, sgt->orig_nents, 1, dir, attrs); in dma_alloc_noncontiguous()
671 struct sg_table *sgt, enum dma_data_direction dir) in free_single_sgt() argument
674 dir); in free_single_sgt()
680 struct sg_table *sgt, enum dma_data_direction dir) in dma_free_noncontiguous() argument
684 debug_dma_unmap_sg(dev, sgt->sgl, sgt->orig_nents, dir); in dma_free_noncontiguous()
686 ops->free_noncontiguous(dev, size, sgt, dir); in dma_free_noncontiguous()
688 free_single_sgt(dev, size, sgt, dir); in dma_free_noncontiguous()