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;
633 static struct page * __meminit populate_section_memmap(unsigned long pfn,
644 unsigned long end = start + nr_pages * sizeof(struct page);
648 static void free_map_bootmem(struct page *memmap)
705 static struct page * __meminit populate_section_memmap(unsigned long pfn,
709 return kvmalloc_node(array_size(sizeof(struct page),
719 static void free_map_bootmem(struct page *memmap)
723 struct page *page = virt_to_page(memmap);
725 nr_pages = PAGE_ALIGN(PAGES_PER_SECTION * sizeof(struct page))
728 for (i = 0; i < nr_pages; i++, page++) {
729 magic = page->index;
733 maps_section_nr = pfn_to_section_nr(page_to_pfn(page));
734 removing_section_nr = page_private(page);
739 * from page allocator. If removing section's memmap is placed
741 * If it is freed, page allocator may allocate it which will
745 put_page_bootmem(page);
786 struct page *memmap = NULL;
805 * usage maps of other sections fall into the same page). It
830 static struct page * __meminit section_activate(int nid, unsigned long pfn,
836 struct page *memmap;
879 * @pgmap: alternate compound page geometry for devmap mappings
898 struct page *memmap;
914 page_init_poison(memmap, sizeof(struct page) * nr_pages);