aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2012-09-14 12:37:46 -0400
committerIngo Molnar <mingo@kernel.org>2012-09-19 11:12:01 -0400
commit924e101a7ab6f884047f4344e5f1154a4bcd63a6 (patch)
tree047b65a8e11b5d47bccfc08984a60bc845ec906d
parentae13b7b4e041eccf34fa4dd58581fe1441375578 (diff)
x86/debug: Dump family, model, stepping of the boot CPU
When acting on a user bug report, we find ourselves constantly asking for /proc/cpuinfo in order to know the exact family, model, stepping of the CPU in question. Instead of having to ask this, add this to dmesg so that it is visible and no ambiguities can ensue from looking at the official name string of the CPU coming from CPUID and trying to map it to f/m/s. Output then looks like this: [ 0.146041] smpboot: CPU0: AMD FX(tm)-8100 Eight-Core Processor (fam: 15, model: 01, stepping: 02) Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Link: http://lkml.kernel.org/r/1347640666-13638-1-git-send-email-bp@amd64.org [ tweaked it minimally to add commas. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/cpu/common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index a5fbc3c5fccc..1cc48ff91cb3 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1023,14 +1023,16 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
1023 printk(KERN_CONT "%s ", vendor); 1023 printk(KERN_CONT "%s ", vendor);
1024 1024
1025 if (c->x86_model_id[0]) 1025 if (c->x86_model_id[0])
1026 printk(KERN_CONT "%s", c->x86_model_id); 1026 printk(KERN_CONT "%s", strim(c->x86_model_id));
1027 else 1027 else
1028 printk(KERN_CONT "%d86", c->x86); 1028 printk(KERN_CONT "%d86", c->x86);
1029 1029
1030 printk(KERN_CONT " (fam: %02x, model: %02x", c->x86, c->x86_model);
1031
1030 if (c->x86_mask || c->cpuid_level >= 0) 1032 if (c->x86_mask || c->cpuid_level >= 0)
1031 printk(KERN_CONT " stepping %02x\n", c->x86_mask); 1033 printk(KERN_CONT ", stepping: %02x)\n", c->x86_mask);
1032 else 1034 else
1033 printk(KERN_CONT "\n"); 1035 printk(KERN_CONT ")\n");
1034 1036
1035 print_cpu_msr(c); 1037 print_cpu_msr(c);
1036} 1038}