summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorkeith mannthey <kmannth@us.ibm.com>2006-09-25 16:25:35 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:26 -0700
commiteef1cc3099aa25040099a0721346b550c9722640 (patch)
treefa7d16447302e60dd4a7cbe110d2403a4200a1cf /arch
parent1ada841196360876c5077ae2431ce5b90f9bbec2 (diff)
i386: fix flat mode numa on a real numa system
If there is only 1 node in the system cpus should think they are apart of some other node. If cases where a real numa system boots the Flat numa option make sure the cpus don't claim to be apart on a non-existent node. Signed-off-by: Keith Mannthey <kmannth@us.ibm.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/smpboot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index f948419c888a..efe07990e7fc 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -642,9 +642,13 @@ static void map_cpu_to_logical_apicid(void)
{
int cpu = smp_processor_id();
int apicid = logical_smp_processor_id();
+ int node = apicid_to_node(apicid);
+
+ if (!node_online(node))
+ node = first_online_node;
cpu_2_logical_apicid[cpu] = apicid;
- map_cpu_to_node(cpu, apicid_to_node(apicid));
+ map_cpu_to_node(cpu, node);
}
static void unmap_cpu_to_logical_apicid(int cpu)