summaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorRavikiran G Thirumalai <kiran@scalex86.org>2005-10-03 10:36:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-03 10:54:22 -0700
commitddea7be0ec8d1374f0b483a81566ed56ec9f3905 (patch)
treec04ca29bf4bcf047aacabcbce4d451817df155c3 /arch/x86_64
parent7d6322b4659216fff76619d3b4088eecbdfa46d5 (diff)
downloadlinux-3.10-ddea7be0ec8d1374f0b483a81566ed56ec9f3905.tar.gz
linux-3.10-ddea7be0ec8d1374f0b483a81566ed56ec9f3905.tar.bz2
linux-3.10-ddea7be0ec8d1374f0b483a81566ed56ec9f3905.zip
[PATCH] x86_64: Fix numa node topology detection for srat based x86_64 boxes
2.6.14-rc2 does not assign cpus to proper nodeids on our em64t numa boxen. Our boxes use acpi srat for parsing the numa information. srat_detect_node() used phys_proc_id[] to get to the cpu's local apic id, but phys_proc_id[] represents the cpu<->initial_apic_id mapping. The following patch fixes this problem. Now apicid_to_node[] is properly indexed with the local apic id. Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/setup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 257f5ba1790..cb28df14ff6 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -967,13 +967,12 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
static void srat_detect_node(void)
{
#ifdef CONFIG_NUMA
- unsigned apicid, node;
+ unsigned node;
int cpu = smp_processor_id();
/* Don't do the funky fallback heuristics the AMD version employs
for now. */
- apicid = phys_proc_id[cpu];
- node = apicid_to_node[apicid];
+ node = apicid_to_node[hard_smp_processor_id()];
if (node == NUMA_NO_NODE)
node = 0;
cpu_to_node[cpu] = node;