|
@@ -126,9 +126,6 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
|
|
struct mem_section *ms;
|
|
struct mem_section *ms;
|
|
struct page *page, *memmap;
|
|
struct page *page, *memmap;
|
|
|
|
|
|
- if (!pfn_valid(start_pfn))
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
section_nr = pfn_to_section_nr(start_pfn);
|
|
section_nr = pfn_to_section_nr(start_pfn);
|
|
ms = __nr_to_section(section_nr);
|
|
ms = __nr_to_section(section_nr);
|
|
|
|
|
|
@@ -187,9 +184,16 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
|
|
end_pfn = pfn + pgdat->node_spanned_pages;
|
|
end_pfn = pfn + pgdat->node_spanned_pages;
|
|
|
|
|
|
/* register_section info */
|
|
/* register_section info */
|
|
- for (; pfn < end_pfn; pfn += PAGES_PER_SECTION)
|
|
|
|
- register_page_bootmem_info_section(pfn);
|
|
|
|
-
|
|
|
|
|
|
+ for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
|
|
|
|
+ /*
|
|
|
|
+ * Some platforms can assign the same pfn to multiple nodes - on
|
|
|
|
+ * node0 as well as nodeN. To avoid registering a pfn against
|
|
|
|
+ * multiple nodes we check that this pfn does not already
|
|
|
|
+ * reside in some other node.
|
|
|
|
+ */
|
|
|
|
+ if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
|
|
|
|
+ register_page_bootmem_info_section(pfn);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
|
|
#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
|
|
|
|
|