Skip to content

Commit

Permalink
[PATCH] i386: fix flat mode numa on a real numa system
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
keith mannthey authored and Linus Torvalds committed Sep 26, 2006
1 parent 3212fe1 commit bfa0e9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/i386/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bfa0e9a

Please sign in to comment.