diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-08-29 13:17:14 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-04 09:55:29 +0200 |
commit | 0d96b9ff748b5f57d6f1d6d21209f5745245aadc (patch) | |
tree | aef8741a93293bcd85a7d7d7e83706717a8f0a51 /arch/x86/kernel/cpu | |
parent | 5a925b4282d7f805deafde62001a83dbaf8be275 (diff) |
x86: Use hard_smp_processor_id() to get apic id for AMD K8 cpus
Otherwise, system with apci id lifting will have wrong apicid in
/proc/cpuinfo.
and use that in srat_detect_node().
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <4A998CCA.1040407@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index a76d2c18f150..e1600c775e1d 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -336,7 +336,7 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c) #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64) int cpu = smp_processor_id(); int node; - unsigned apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid; + unsigned apicid = c->apicid; node = per_cpu(cpu_llc_id, cpu); @@ -481,6 +481,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) } if (c->x86 == 0x10 || c->x86 == 0x11) set_cpu_cap(c, X86_FEATURE_REP_GOOD); + + /* get apicid instead of initial apic id from cpuid */ + c->apicid = hard_smp_processor_id(); #else /* |