Lines Matching refs:pages
186 static void __iommu_dma_free_pages(struct page **pages, int count) in __iommu_dma_free_pages() argument
189 __free_page(pages[count]); in __iommu_dma_free_pages()
190 kvfree(pages); in __iommu_dma_free_pages()
195 struct page **pages; in __iommu_dma_alloc_pages() local
196 unsigned int i = 0, array_size = count * sizeof(*pages); in __iommu_dma_alloc_pages()
200 pages = kzalloc(array_size, GFP_KERNEL); in __iommu_dma_alloc_pages()
202 pages = vzalloc(array_size); in __iommu_dma_alloc_pages()
203 if (!pages) in __iommu_dma_alloc_pages()
235 __iommu_dma_free_pages(pages, i); in __iommu_dma_alloc_pages()
241 pages[i++] = page++; in __iommu_dma_alloc_pages()
243 return pages; in __iommu_dma_alloc_pages()
256 void iommu_dma_free(struct device *dev, struct page **pages, size_t size, in iommu_dma_free() argument
260 __iommu_dma_free_pages(pages, PAGE_ALIGN(size) >> PAGE_SHIFT); in iommu_dma_free()
288 struct page **pages; in iommu_dma_alloc() local
295 pages = __iommu_dma_alloc_pages(count, gfp); in iommu_dma_alloc()
296 if (!pages) in iommu_dma_alloc()
304 if (sg_alloc_table_from_pages(&sgt, pages, count, 0, size, GFP_KERNEL)) in iommu_dma_alloc()
326 return pages; in iommu_dma_alloc()
333 __iommu_dma_free_pages(pages, count); in iommu_dma_alloc()
347 int iommu_dma_mmap(struct page **pages, size_t size, struct vm_area_struct *vma) in iommu_dma_mmap() argument
354 ret = vm_insert_page(vma, uaddr, pages[i]); in iommu_dma_mmap()