From: Dave Hansen <haveblue@us.ibm.com>

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: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/mm/discontig.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN arch/i386/mm/discontig.c~x86-fix-booting-non-numa-system-with-numa-config arch/i386/mm/discontig.c
--- 25/arch/i386/mm/discontig.c~x86-fix-booting-non-numa-system-with-numa-config	Fri Mar 11 14:54:33 2005
+++ 25-akpm/arch/i386/mm/discontig.c	Fri Mar 11 14:54:33 2005
@@ -121,6 +121,7 @@ int __init get_memcfg_numa_flat(void)
 	find_max_pfn();
 	node_start_pfn[0] = 0;
 	node_end_pfn[0] = max_pfn;
+	memory_present(0, 0, max_pfn);
 
         /* Indicate there is one node available. */
 	nodes_clear(node_online_map);
_