Commit ddea7be0 authored by Ravikiran G Thirumalai's avatar Ravikiran G Thirumalai Committed by Linus Torvalds

[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: default avatarRavikiran Thirumalai <kiran@scalex86.org>
Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7d6322b4
...@@ -967,13 +967,12 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) ...@@ -967,13 +967,12 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
static void srat_detect_node(void) static void srat_detect_node(void)
{ {
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
unsigned apicid, node; unsigned node;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
/* Don't do the funky fallback heuristics the AMD version employs /* Don't do the funky fallback heuristics the AMD version employs
for now. */ for now. */
apicid = phys_proc_id[cpu]; node = apicid_to_node[hard_smp_processor_id()];
node = apicid_to_node[apicid];
if (node == NUMA_NO_NODE) if (node == NUMA_NO_NODE)
node = 0; node = 0;
cpu_to_node[cpu] = node; cpu_to_node[cpu] = node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment