Lines Matching refs:page
143 dma_addr_t dma_map_page_attrs(struct device *dev, struct page *page, in dma_map_page_attrs() argument
156 arch_dma_map_page_direct(dev, page_to_phys(page) + offset + size)) in dma_map_page_attrs()
157 addr = dma_direct_map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
159 addr = ops->map_page(dev, page, offset, size, dir, attrs); in dma_map_page_attrs()
160 kmsan_handle_dma(page, offset, size, dir); in dma_map_page_attrs()
161 debug_dma_map_page(dev, page, offset, size, dir, addr, attrs); in dma_map_page_attrs()
549 static struct page *__dma_alloc_pages(struct device *dev, size_t size, in __dma_alloc_pages()
567 struct page *dma_alloc_pages(struct device *dev, size_t size, in dma_alloc_pages()
570 struct page *page = __dma_alloc_pages(dev, size, dma_handle, dir, gfp); in dma_alloc_pages() local
572 if (page) in dma_alloc_pages()
573 debug_dma_map_page(dev, page, 0, size, dir, *dma_handle, 0); in dma_alloc_pages()
574 return page; in dma_alloc_pages()
578 static void __dma_free_pages(struct device *dev, size_t size, struct page *page, in __dma_free_pages() argument
585 dma_direct_free_pages(dev, size, page, dma_handle, dir); in __dma_free_pages()
587 ops->free_pages(dev, size, page, dma_handle, dir); in __dma_free_pages()
590 void dma_free_pages(struct device *dev, size_t size, struct page *page, in dma_free_pages() argument
594 __dma_free_pages(dev, size, page, dma_handle, dir); in dma_free_pages()
599 size_t size, struct page *page) in dma_mmap_pages() argument
606 page_to_pfn(page) + vma->vm_pgoff, in dma_mmap_pages()
615 struct page *page; in alloc_single_sgt() local
622 page = __dma_alloc_pages(dev, size, &sgt->sgl->dma_address, dir, gfp); in alloc_single_sgt()
623 if (!page) in alloc_single_sgt()
625 sg_set_page(sgt->sgl, page, PAGE_ALIGN(size), 0); in alloc_single_sgt()