Lines Matching full:pages
23 struct page **pages; member
50 * Ensure that the allocated pages are zeroed, and that any data in __dma_clear_buffer()
64 struct page **pages; in __dma_alloc_buffer() local
67 pages = kvzalloc(array_size, GFP_KERNEL); in __dma_alloc_buffer()
68 if (!pages) in __dma_alloc_buffer()
76 pages[i] = alloc_pages(gfp, order); in __dma_alloc_buffer()
77 while (!pages[i] && order) in __dma_alloc_buffer()
78 pages[i] = alloc_pages(gfp, --order); in __dma_alloc_buffer()
79 if (!pages[i]) in __dma_alloc_buffer()
83 split_page(pages[i], order); in __dma_alloc_buffer()
86 pages[i + j] = pages[i] + j; in __dma_alloc_buffer()
89 __dma_clear_buffer(pages[i], PAGE_SIZE << order, attrs); in __dma_alloc_buffer()
94 return pages; in __dma_alloc_buffer()
97 if (pages[i]) in __dma_alloc_buffer()
98 __free_pages(pages[i], 0); in __dma_alloc_buffer()
99 kvfree(pages); in __dma_alloc_buffer()
103 static void __dma_free_buffer(struct device *dev, struct page **pages, in __dma_free_buffer() argument
109 for (i = 0; i < count && pages[i]; i++) { in __dma_free_buffer()
110 __dma_clear_buffer(pages[i], PAGE_SIZE, attrs); in __dma_free_buffer()
111 __free_pages(pages[i], 0); in __dma_free_buffer()
114 kvfree(pages); in __dma_free_buffer()
159 struct page **pages; in ipu6_dma_alloc() local
176 pages = __dma_alloc_buffer(dev, size, gfp, attrs); in ipu6_dma_alloc()
177 if (!pages) in ipu6_dma_alloc()
183 pci_dma_addr = dma_map_page_attrs(&pdev->dev, pages[i], 0, in ipu6_dma_alloc()
206 info->vaddr = vmap(pages, count, VM_USERMAP, PAGE_KERNEL); in ipu6_dma_alloc()
212 info->pages = pages; in ipu6_dma_alloc()
230 __dma_free_buffer(dev, pages, size, attrs); in ipu6_dma_alloc()
249 struct page **pages; in ipu6_dma_free() local
262 if (WARN_ON(!info->pages)) in ipu6_dma_free()
269 pages = info->pages; in ipu6_dma_free()
284 __dma_free_buffer(dev, pages, size, attrs); in ipu6_dma_free()
318 info->pages[i]); in ipu6_dma_mmap()
478 if (WARN_ON(!info->pages)) in ipu6_dma_get_sgtable()
483 ret = sg_alloc_table_from_pages(sgt, info->pages, n_pages, 0, size, in ipu6_dma_get_sgtable()