mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
mm: use early_pfn_to_nid in register_page_bootmem_info_node
register_page_bootmem_info_node() is invoked in mem_init(), so it will be called before page_alloc_init_late() if DEFERRED_STRUCT_PAGE_INIT is enabled. But, pfn_to_nid() depends on memmap which won't be fully setup until page_alloc_init_late() is done, so replace pfn_to_nid() by early_pfn_to_nid(). Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Yang Shi <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
fe53ca5427
commit
f65e91df25
1 file changed
+1
-1
+1
-1
@@ -300,7 +300,7 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
|
||||
* multiple nodes we check that this pfn does not already
|
||||
* reside in some other nodes.
|
||||
*/
|
||||
if (pfn_valid(pfn) && (pfn_to_nid(pfn) == node))
|
||||
if (pfn_valid(pfn) && (early_pfn_to_nid(pfn) == node))
|
||||
register_page_bootmem_info_section(pfn);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user