Lines Matching refs:nr_pages
186 unsigned long nr_pages) in subsection_mask_set() argument
189 int end = subsection_map_index(pfn + nr_pages - 1); in subsection_mask_set()
194 void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages) in subsection_map_init() argument
196 int end_sec = pfn_to_section_nr(pfn + nr_pages - 1); in subsection_map_init()
199 if (!nr_pages) in subsection_map_init()
206 pfns = min(nr_pages, PAGES_PER_SECTION in subsection_map_init()
216 nr_pages -= pfns; in subsection_map_init()
220 void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages) in subsection_map_init() argument
430 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in __populate_section_memmap() argument
632 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument
634 return __populate_section_memmap(pfn, nr_pages, nid, altmap); in populate_section_memmap()
637 static void depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages, in depopulate_section_memmap() argument
641 unsigned long end = start + nr_pages * sizeof(struct page); in depopulate_section_memmap()
653 static int clear_subsection_map(unsigned long pfn, unsigned long nr_pages) in clear_subsection_map() argument
661 subsection_mask_set(map, pfn, nr_pages); in clear_subsection_map()
667 pfn, nr_pages)) in clear_subsection_map()
680 static int fill_subsection_map(unsigned long pfn, unsigned long nr_pages) in fill_subsection_map() argument
687 subsection_mask_set(map, pfn, nr_pages); in fill_subsection_map()
703 unsigned long nr_pages, int nid, struct vmem_altmap *altmap) in populate_section_memmap() argument
709 static void depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages, in depopulate_section_memmap() argument
718 unsigned long magic, nr_pages; in free_map_bootmem() local
721 nr_pages = PAGE_ALIGN(PAGES_PER_SECTION * sizeof(struct page)) in free_map_bootmem()
724 for (i = 0; i < nr_pages; i++, page++) { in free_map_bootmem()
745 static int clear_subsection_map(unsigned long pfn, unsigned long nr_pages) in clear_subsection_map() argument
755 static int fill_subsection_map(unsigned long pfn, unsigned long nr_pages) in fill_subsection_map() argument
777 static void section_deactivate(unsigned long pfn, unsigned long nr_pages, in section_deactivate() argument
785 if (clear_subsection_map(pfn, nr_pages)) in section_deactivate()
817 depopulate_section_memmap(pfn, nr_pages, altmap); in section_deactivate()
826 unsigned long nr_pages, struct vmem_altmap *altmap) in section_activate() argument
840 rc = fill_subsection_map(pfn, nr_pages); in section_activate()
855 if (nr_pages < PAGES_PER_SECTION && early_section(ms)) in section_activate()
858 memmap = populate_section_memmap(pfn, nr_pages, nid, altmap); in section_activate()
860 section_deactivate(pfn, nr_pages, altmap); in section_activate()
886 unsigned long nr_pages, struct vmem_altmap *altmap) in sparse_add_section() argument
897 memmap = section_activate(nid, start_pfn, nr_pages, altmap); in sparse_add_section()
905 page_init_poison(memmap, sizeof(struct page) * nr_pages); in sparse_add_section()
920 static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) in clear_hwpoisoned_pages() argument
933 for (i = 0; i < nr_pages; i++) { in clear_hwpoisoned_pages()
941 static inline void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) in clear_hwpoisoned_pages() argument
947 unsigned long nr_pages, unsigned long map_offset, in sparse_remove_section() argument
951 nr_pages - map_offset); in sparse_remove_section()
952 section_deactivate(pfn, nr_pages, altmap); in sparse_remove_section()