diff options
author | keith mannthey <kmannth@us.ibm.com> | 2006-09-25 19:25:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-25 20:38:36 -0400 |
commit | bfa0e9a07cd31f3858239dbc93011b82780acf4b (patch) | |
tree | a46cfc35789a597a5005ec1332897364b961e429 /arch | |
parent | 3212fe1594e577463bc8601d28aa008f520c3377 (diff) |
[PATCH] 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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 6 |
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) | |||
642 | { | 642 | { |
643 | int cpu = smp_processor_id(); | 643 | int cpu = smp_processor_id(); |
644 | int apicid = logical_smp_processor_id(); | 644 | int apicid = logical_smp_processor_id(); |
645 | int node = apicid_to_node(apicid); | ||
646 | |||
647 | if (!node_online(node)) | ||
648 | node = first_online_node; | ||
645 | 649 | ||
646 | cpu_2_logical_apicid[cpu] = apicid; | 650 | cpu_2_logical_apicid[cpu] = apicid; |
647 | map_cpu_to_node(cpu, apicid_to_node(apicid)); | 651 | map_cpu_to_node(cpu, node); |
648 | } | 652 | } |
649 | 653 | ||
650 | static void unmap_cpu_to_logical_apicid(int cpu) | 654 | static void unmap_cpu_to_logical_apicid(int cpu) |