Commit 2172436c authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] x86: fix booting non-NUMA system with NUMA config

There is a bug booting with CONFIG_NUMA=y, CONFIG_X86_GENERICARCH=y, and
booting on a non-NUMA system.  While not the most common configuration, it
should surely be supported.

memmap_init_zone() is the first user to do pfn_to_nid(), which relies on
physnode_map[] to be done properly.  memory_present() was supposed to do
that, but never got called for the flat configuration, so pfn_to_nid() was
returning -1 on valid pages.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 05121992
...@@ -121,6 +121,7 @@ int __init get_memcfg_numa_flat(void) ...@@ -121,6 +121,7 @@ int __init get_memcfg_numa_flat(void)
find_max_pfn(); find_max_pfn();
node_start_pfn[0] = 0; node_start_pfn[0] = 0;
node_end_pfn[0] = max_pfn; node_end_pfn[0] = max_pfn;
memory_present(0, 0, max_pfn);
/* Indicate there is one node available. */ /* Indicate there is one node available. */
nodes_clear(node_online_map); nodes_clear(node_online_map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment