Lines Matching full:pages

23 	struct page **pages;  member
49 * Ensure that the allocated pages are zeroed, and that any data in __clear_buffer()
62 struct page **pages; in __alloc_buffer() local
65 pages = kvzalloc(array_size, GFP_KERNEL); in __alloc_buffer()
66 if (!pages) in __alloc_buffer()
74 pages[i] = alloc_pages(gfp, order); in __alloc_buffer()
75 while (!pages[i] && order) in __alloc_buffer()
76 pages[i] = alloc_pages(gfp, --order); in __alloc_buffer()
77 if (!pages[i]) in __alloc_buffer()
81 split_page(pages[i], order); in __alloc_buffer()
84 pages[i + j] = pages[i] + j; in __alloc_buffer()
87 __clear_buffer(pages[i], PAGE_SIZE << order, attrs); in __alloc_buffer()
92 return pages; in __alloc_buffer()
95 if (pages[i]) in __alloc_buffer()
96 __free_pages(pages[i], 0); in __alloc_buffer()
97 kvfree(pages); in __alloc_buffer()
101 static void __free_buffer(struct page **pages, size_t size, unsigned long attrs) in __free_buffer() argument
106 for (i = 0; i < count && pages[i]; i++) { in __free_buffer()
107 __clear_buffer(pages[i], PAGE_SIZE, attrs); in __free_buffer()
108 __free_pages(pages[i], 0); in __free_buffer()
111 kvfree(pages); in __free_buffer()
162 struct page **pages; in ipu6_dma_alloc() local
179 pages = __alloc_buffer(size, gfp, attrs); in ipu6_dma_alloc()
180 if (!pages) in ipu6_dma_alloc()
186 pci_dma_addr = dma_map_page_attrs(&pdev->dev, pages[i], 0, in ipu6_dma_alloc()
209 info->vaddr = vmap(pages, count, VM_USERMAP, PAGE_KERNEL); in ipu6_dma_alloc()
215 info->pages = pages; in ipu6_dma_alloc()
233 __free_buffer(pages, size, attrs); in ipu6_dma_alloc()
252 struct page **pages; in ipu6_dma_free() local
265 if (WARN_ON(!info->pages)) in ipu6_dma_free()
272 pages = info->pages; in ipu6_dma_free()
287 __free_buffer(pages, size, attrs); in ipu6_dma_free()
322 info->pages[i]); in ipu6_dma_mmap()
397 dev_dbg(dev, "dmamap trying to map %d ents %zu pages\n", in ipu6_dma_map_sg()
428 dev_dbg(dev, "dmamap %d ents %zu pages mapped\n", nents, npages); in ipu6_dma_map_sg()
481 if (WARN_ON(!info->pages)) in ipu6_dma_get_sgtable()
486 ret = sg_alloc_table_from_pages(sgt, info->pages, n_pages, 0, size, in ipu6_dma_get_sgtable()