Lines Matching refs:page
36 * If we did not store the node number in the page then we have to
38 * node the page belongs to.
46 int page_to_nid(const struct page *page)
48 return section_to_node_table[page_to_section(page)];
277 * physical page frame number.
279 static unsigned long sparse_encode_mem_map(struct page *mem_map, unsigned long pnum)
292 struct page *sparse_decode_mem_map(unsigned long coded_mem_map, unsigned long pnum)
296 return ((struct page *)coded_mem_map) + section_nr_to_pfn(pnum);
301 unsigned long pnum, struct page *mem_map,
339 * A page may contain usemaps for other sections preventing the
340 * page being freed and making a section unremovable while
419 return ALIGN(sizeof(struct page) * PAGES_PER_SECTION, PMD_SIZE);
425 return PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION);
428 struct page __init *__populate_section_memmap(unsigned long pfn,
433 struct page *map = sparse_buffer_alloc(size);
511 struct page *map;
631 static struct page * __meminit populate_section_memmap(unsigned long pfn,
642 unsigned long end = start + nr_pages * sizeof(struct page);
646 static void free_map_bootmem(struct page *memmap)
703 static struct page * __meminit populate_section_memmap(unsigned long pfn,
707 return kvmalloc_node(array_size(sizeof(struct page),
717 static void free_map_bootmem(struct page *memmap)
721 struct page *page = virt_to_page(memmap);
723 nr_pages = PAGE_ALIGN(PAGES_PER_SECTION * sizeof(struct page))
726 for (i = 0; i < nr_pages; i++, page++) {
727 magic = page->index;
731 maps_section_nr = pfn_to_section_nr(page_to_pfn(page));
732 removing_section_nr = page_private(page);
737 * from page allocator. If removing section's memmap is placed
739 * If it is freed, page allocator may allocate it which will
743 put_page_bootmem(page);
784 struct page *memmap = NULL;
803 * usage maps of other sections fall into the same page). It
828 static struct page * __meminit section_activate(int nid, unsigned long pfn,
834 struct page *memmap;
877 * @pgmap: alternate compound page geometry for devmap mappings
896 struct page *memmap;
911 page_init_poison(memmap, sizeof(struct page) * nr_pages);