mm: use early_pfn_to_nid in register_page_bootmem_info_node
authorYang Shi <[email protected]>
Fri, 27 May 2016 21:27:32 +0000 (14:27 -0700)
committerLinus Torvalds <[email protected]>
Fri, 27 May 2016 21:49:37 +0000 (14:49 -0700)
commitf65e91df25aa426289cbcb580ca3183e24979fb1
tree65de5de39a825fb9618e31e2d219fe89069b6ba6
parentfe53ca54270a757f0a28ee6bf3a54d952b550ed0
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]>
mm/memory_hotplug.c