Lines Matching refs:pages

22  * pcpu_get_pages - get temp pages array
29 * Pointer to temp pages array on success.
33 static struct page **pages;
34 size_t pages_size = pcpu_nr_units * pcpu_unit_pages * sizeof(pages[0]);
38 if (!pages)
39 pages = pcpu_mem_zalloc(pages_size, GFP_KERNEL);
40 return pages;
44 * pcpu_free_pages - free pages which were allocated for @chunk
45 * @chunk: chunk pages were allocated for
46 * @pages: array of pages to be freed, indexed by pcpu_page_idx()
50 * Free pages [@page_start and @page_end) in @pages for all units.
51 * The pages were allocated for @chunk.
54 struct page **pages, int page_start, int page_end)
61 struct page *page = pages[pcpu_page_idx(cpu, i)];
70 * pcpu_alloc_pages - allocates pages for @chunk
72 * @pages: array to put the allocated pages into, indexed by pcpu_page_idx()
77 * Allocate pages [@page_start,@page_end) into @pages for all units.
79 * content of @pages and will pass it verbatim to pcpu_map_pages().
82 struct page **pages, int page_start, int page_end,
92 struct page **pagep = &pages[pcpu_page_idx(cpu, i)];
103 __free_page(pages[pcpu_page_idx(cpu, i)]);
109 __free_page(pages[pcpu_page_idx(tcpu, i)]);
140 * pcpu_unmap_pages - unmap pages out of a pcpu_chunk
142 * @pages: pages array which can be used to pass information to free
146 * For each cpu, unmap pages [@page_start,@page_end) out of @chunk.
147 * Corresponding elements in @pages were cleared by the caller and can
153 struct page **pages, int page_start, int page_end)
164 pages[pcpu_page_idx(cpu, i)] = page;
192 static int __pcpu_map_pages(unsigned long addr, struct page **pages,
196 PAGE_KERNEL, pages);
200 * pcpu_map_pages - map pages into a pcpu_chunk
202 * @pages: pages array containing pages to be mapped
206 * For each cpu, map pages [@page_start,@page_end) into @chunk. The
214 struct page **pages, int page_start, int page_end)
221 &pages[pcpu_page_idx(cpu, page_start)],
227 pcpu_set_page_chunk(pages[pcpu_page_idx(cpu, i)],
269 * For each cpu, populate and map pages [@page_start,@page_end) into
278 struct page **pages;
280 pages = pcpu_get_pages();
281 if (!pages)
284 if (pcpu_alloc_pages(chunk, pages, page_start, page_end, gfp))
287 if (pcpu_map_pages(chunk, pages, page_start, page_end)) {
288 pcpu_free_pages(chunk, pages, page_start, page_end);
302 * For each cpu, depopulate and unmap pages [@page_start,@page_end)
311 struct page **pages;
315 * successful population attempt so the temp pages array must
318 pages = pcpu_get_pages();
319 BUG_ON(!pages);
324 pcpu_unmap_pages(chunk, pages, page_start, page_end);
328 pcpu_free_pages(chunk, pages, page_start, page_end);