Lines Matching defs:pages

35 #include "iommu-pages.h"
115 unsigned long pages;
163 fq->entries[idx].pages);
202 unsigned long pfn, unsigned long pages,
240 fq->entries[idx].pages = pages;
266 /* The IOVAs will be torn down separately, so just free our queued pages */
878 static void __iommu_dma_free_pages(struct page **pages, int count)
881 __free_page(pages[count]);
882 kvfree(pages);
888 struct page **pages;
895 pages = kvcalloc(count, sizeof(*pages), GFP_KERNEL);
896 if (!pages)
899 /* IOMMU can map any pages, so himem can also be used here */
927 __iommu_dma_free_pages(pages, i);
932 pages[i++] = page++;
934 return pages;
939 * but an IOMMU which supports smaller pages might not map the whole thing.
951 struct page **pages;
970 pages = __iommu_dma_alloc_pages(dev, count, alloc_sizes >> PAGE_SHIFT,
972 if (!pages)
987 if (sg_alloc_table_from_pages(sgt, pages, count, 0, size, gfp))
1005 return pages;
1012 __iommu_dma_free_pages(pages, count);
1020 struct page **pages;
1024 pages = __iommu_dma_alloc_noncontiguous(dev, size, &sgt, gfp, prot,
1026 if (!pages)
1030 vaddr = dma_common_pages_remap(pages, size, prot,
1038 __iommu_dma_free_pages(pages, PAGE_ALIGN(size) >> PAGE_SHIFT);
1052 sh->pages = __iommu_dma_alloc_noncontiguous(dev, size, &sh->sgt, gfp,
1054 if (!sh->pages) {
1067 __iommu_dma_free_pages(sh->pages, PAGE_ALIGN(size) >> PAGE_SHIFT);
1347 * aligned to IOMMU pages. Hence the need for this complicated bit of
1539 struct page *page = NULL, **pages = NULL;
1551 pages = dma_common_find_pages(cpu_addr);
1552 if (!pages)
1560 if (pages)
1561 __iommu_dma_free_pages(pages, count);
1662 struct page **pages = dma_common_find_pages(cpu_addr);
1664 if (pages)
1665 return vm_map_pages(vma, pages, nr_pages);
1684 struct page **pages = dma_common_find_pages(cpu_addr);
1686 if (pages) {
1687 return sg_alloc_table_from_pages(sgt, pages,