/* Allocate pages [@page_start,@page_end) into @pages for all units. The allocation is for @chunk. Percpu core doesn't care about the content of @pages and will pass it verbatim to pcpu_map_pages().  */
static int pcpu_alloc_pages(struct pcpu_chunk *chunk, struct page **pages, unsigned long *populated, int page_start, int page_end)
/* Allocate pages [@page_start,@page_end) into @pages for all units. The allocation is for @chunk. Percpu core doesn't care about the content of @pages and will pass it verbatim to pcpu_map_pages().  */
static int pcpu_alloc_pages(struct pcpu_chunk *chunk, struct page **pages, unsigned long *populated, int page_start, int page_end)
{
	const gfp_t gfp = GFP_KERNEL | __GFP_HIGHMEM | __GFP_COLD;
	unsigned int cpu;
	int i;
	for_each_possible_cpu(cpu) {
		for (i = page_start; i < page_end; i++) {
			struct page **pagep = &pages[pcpu_page_idx(cpu, i)];
			*pagep = alloc_pages_node(cpu_to_node(cpu), gfp, 0);
			if (!*pagep) {
				pcpu_free_pages(chunk, pages, populated,
						page_start, page_end);
				return -ENOMEM;
			}
		}
	}
	return 0;
}