* [PATCH] x86: Dump family, model, stepping of the BSP
@ 2012-09-14 16:37 Borislav Petkov
2012-09-19 10:52 ` Borislav Petkov
2012-09-19 17:05 ` [tip:x86/debug] x86/debug: Dump family, model, stepping of the boot CPU tip-bot for Borislav Petkov
0 siblings, 2 replies; 3+ messages in thread
From: Borislav Petkov @ 2012-09-14 16:37 UTC (permalink / raw)
To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner
Cc: Andreas Herrmann, LKML, Borislav Petkov
From: Borislav Petkov <borislav.petkov@amd.com>
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>
---
arch/x86/kernel/cpu/common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 2ea24da6f7fb..90f7f8f9212f 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1022,14 +1022,16 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
printk(KERN_CONT "%s ", vendor);
if (c->x86_model_id[0])
- printk(KERN_CONT "%s", c->x86_model_id);
+ printk(KERN_CONT "%s", strim(c->x86_model_id));
else
printk(KERN_CONT "%d86", c->x86);
+ printk(KERN_CONT " (fam: %02x model: %02x", c->x86, c->x86_model);
+
if (c->x86_mask || c->cpuid_level >= 0)
- printk(KERN_CONT " stepping %02x\n", c->x86_mask);
+ printk(KERN_CONT " stepping: %02x)\n", c->x86_mask);
else
- printk(KERN_CONT "\n");
+ printk(KERN_CONT ")\n");
print_cpu_msr(c);
}
--
1.7.11.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: Dump family, model, stepping of the BSP
2012-09-14 16:37 [PATCH] x86: Dump family, model, stepping of the BSP Borislav Petkov
@ 2012-09-19 10:52 ` Borislav Petkov
2012-09-19 17:05 ` [tip:x86/debug] x86/debug: Dump family, model, stepping of the boot CPU tip-bot for Borislav Petkov
1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2012-09-19 10:52 UTC (permalink / raw)
To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner; +Cc: Andreas Herrmann, LKML
On Fri, Sep 14, 2012 at 06:37:46PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <borislav.petkov@amd.com>
>
> 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)
Guys, any comments on this one? I think dumping the f/m/s is very
helpful.
Thanks.
> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
> ---
> arch/x86/kernel/cpu/common.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 2ea24da6f7fb..90f7f8f9212f 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -1022,14 +1022,16 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
> printk(KERN_CONT "%s ", vendor);
>
> if (c->x86_model_id[0])
> - printk(KERN_CONT "%s", c->x86_model_id);
> + printk(KERN_CONT "%s", strim(c->x86_model_id));
> else
> printk(KERN_CONT "%d86", c->x86);
>
> + printk(KERN_CONT " (fam: %02x model: %02x", c->x86, c->x86_model);
> +
> if (c->x86_mask || c->cpuid_level >= 0)
> - printk(KERN_CONT " stepping %02x\n", c->x86_mask);
> + printk(KERN_CONT " stepping: %02x)\n", c->x86_mask);
> else
> - printk(KERN_CONT "\n");
> + printk(KERN_CONT ")\n");
>
> print_cpu_msr(c);
> }
> --
> 1.7.11.rc1
>
>
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:x86/debug] x86/debug: Dump family, model, stepping of the boot CPU
2012-09-14 16:37 [PATCH] x86: Dump family, model, stepping of the BSP Borislav Petkov
2012-09-19 10:52 ` Borislav Petkov
@ 2012-09-19 17:05 ` tip-bot for Borislav Petkov
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Borislav Petkov @ 2012-09-19 17:05 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, andreas.herrmann3, tglx, borislav.petkov
Commit-ID: 924e101a7ab6f884047f4344e5f1154a4bcd63a6
Gitweb: http://git.kernel.org/tip/924e101a7ab6f884047f4344e5f1154a4bcd63a6
Author: Borislav Petkov <borislav.petkov@amd.com>
AuthorDate: Fri, 14 Sep 2012 18:37:46 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 19 Sep 2012 17:12:01 +0200
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>
---
arch/x86/kernel/cpu/common.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index a5fbc3c..1cc48ff 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)
printk(KERN_CONT "%s ", vendor);
if (c->x86_model_id[0])
- printk(KERN_CONT "%s", c->x86_model_id);
+ printk(KERN_CONT "%s", strim(c->x86_model_id));
else
printk(KERN_CONT "%d86", c->x86);
+ printk(KERN_CONT " (fam: %02x, model: %02x", c->x86, c->x86_model);
+
if (c->x86_mask || c->cpuid_level >= 0)
- printk(KERN_CONT " stepping %02x\n", c->x86_mask);
+ printk(KERN_CONT ", stepping: %02x)\n", c->x86_mask);
else
- printk(KERN_CONT "\n");
+ printk(KERN_CONT ")\n");
print_cpu_msr(c);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-19 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14 16:37 [PATCH] x86: Dump family, model, stepping of the BSP Borislav Petkov
2012-09-19 10:52 ` Borislav Petkov
2012-09-19 17:05 ` [tip:x86/debug] x86/debug: Dump family, model, stepping of the boot CPU tip-bot for Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).