aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/common.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-05-17 00:53:21 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:13 -0400
commita158608bf4c6260caf26089b00a000851e11357a (patch)
treebccf6f173d6ddcb24aff243573086475b25dfe93 /arch/i386/kernel/cpu/common.c
parent637716a3825e186555361574aa1fa3c0ebf8018b (diff)
[PATCH] x86_64/i386: fix defaults for physical/core id in /proc/cpuinfo
Last round hopefully of cpu_core_id changes hopefully fow now: - Always initialize cpu_core_id for all CPUs, even when no dual core setup is detected. This prevents funny /proc/cpuinfo output - Do the same with phys_proc_id[] even when no HyperThreading - dito. - Use the CPU APIC-ID from CPUID 1 instead of the linux virtual CPU number to identify the core for AMD dual core setups. Patch for i386/x86-64. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/cpu/common.c')
-rw-r--r--arch/i386/kernel/cpu/common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 6be0310e3cd3..11e6e6f23fa0 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -243,6 +243,13 @@ static void __init early_cpu_detect(void)
243 } 243 }
244 244
245 early_intel_workaround(c); 245 early_intel_workaround(c);
246
247#ifdef CONFIG_SMP
248#ifdef CONFIG_X86_HT
249 phys_proc_id[smp_processor_id()] =
250#endif
251 cpu_core_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff;
252#endif
246} 253}
247 254
248void __init generic_identify(struct cpuinfo_x86 * c) 255void __init generic_identify(struct cpuinfo_x86 * c)