Loading mm/page_alloc.c +27 −1 Original line number Diff line number Diff line Loading @@ -5471,6 +5471,30 @@ void __ref build_all_zonelists(pg_data_t *pgdat) #endif } #ifdef CONFIG_SPARSEMEM /* Skip PFNs that belong to non-present sections */ static inline __meminit unsigned long next_pfn(unsigned long pfn) { unsigned long section_nr; section_nr = pfn_to_section_nr(++pfn); if (present_section_nr(section_nr)) return pfn; while (++section_nr <= __highest_present_section_nr) { if (present_section_nr(section_nr)) return section_nr_to_pfn(section_nr); } return -1; } #else static inline __meminit unsigned long next_pfn(unsigned long pfn) { return pfn++; } #endif /* * Initially all pages are reserved - free ones are freed * up by free_all_bootmem() once the early boot process is Loading Loading @@ -5506,8 +5530,10 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, if (context != MEMMAP_EARLY) goto not_early; if (!early_pfn_valid(pfn)) if (!early_pfn_valid(pfn)) { pfn = next_pfn(pfn) - 1; continue; } if (!early_pfn_in_nid(pfn, nid)) continue; if (!update_defer_init(pgdat, pfn, end_pfn, &nr_initialised)) Loading Loading
mm/page_alloc.c +27 −1 Original line number Diff line number Diff line Loading @@ -5471,6 +5471,30 @@ void __ref build_all_zonelists(pg_data_t *pgdat) #endif } #ifdef CONFIG_SPARSEMEM /* Skip PFNs that belong to non-present sections */ static inline __meminit unsigned long next_pfn(unsigned long pfn) { unsigned long section_nr; section_nr = pfn_to_section_nr(++pfn); if (present_section_nr(section_nr)) return pfn; while (++section_nr <= __highest_present_section_nr) { if (present_section_nr(section_nr)) return section_nr_to_pfn(section_nr); } return -1; } #else static inline __meminit unsigned long next_pfn(unsigned long pfn) { return pfn++; } #endif /* * Initially all pages are reserved - free ones are freed * up by free_all_bootmem() once the early boot process is Loading Loading @@ -5506,8 +5530,10 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, if (context != MEMMAP_EARLY) goto not_early; if (!early_pfn_valid(pfn)) if (!early_pfn_valid(pfn)) { pfn = next_pfn(pfn) - 1; continue; } if (!early_pfn_in_nid(pfn, nid)) continue; if (!update_defer_init(pgdat, pfn, end_pfn, &nr_initialised)) Loading