From: Borislav Petkov <bp@amd64.org>
To: David Rientjes <rientjes@google.com>
Cc: Borislav Petkov <bp@amd64.org>, Ingo Molnar <mingo@elte.hu>,
X86-ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/2] x86, microcode: Correct microcode revision format
Date: Tue, 18 Oct 2011 11:48:32 +0200 [thread overview]
Message-ID: <20111018094831.GB17076@aftab> (raw)
In-Reply-To: <alpine.DEB.2.00.1110180108590.8959@chino.kir.corp.google.com>
On Tue, Oct 18, 2011 at 04:14:05AM -0400, David Rientjes wrote:
> On Tue, 18 Oct 2011, Borislav Petkov wrote:
>
> > > > diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> > > > index 8af6fa4..ad8d897 100644
> > > > --- a/arch/x86/kernel/cpu/mcheck/mce.c
> > > > +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> > > > @@ -221,7 +221,7 @@ static void print_mce(struct mce *m)
> > > > * Note this output is parsed by external tools and old fields
> > > > * should not be changed.
> > > > */
> > > > - pr_emerg(HW_ERR "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x microcode %u\n",
> > > > + pr_emerg(HW_ERR "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x microcode %x\n",
> > > > m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid,
> > > > cpu_data(m->extcpu).microcode);
> > > >
> > >
> > > Any reason why this isn't prefixed with "0x"?
> >
> > Well, no strong reason except that APIC is without '0x' and I leaned
> > towards the same for 'microcode'. And since this output format is legacy
> > and MCE stanzas are being parsed by scripts, keeping the format for new
> > fields sounded like the right thing to do, IMHO.
> >
>
> Anytime there's a string that prints decimal, then hex, then decimal, then
> decimal, then hex, then hex, I think it's always better to include a
> prefix where it's not clear. It's printed here without the prefix and in
> other places with the prefix, so I think it would be better to just be as
> explicit as possible.
Why do I need to be explicit in the MCE stanza? I'm fine with what
you're saying but I don't see a compelling reason why, sorry. Especially
since it was defined crappy to begin with.
> And, the argument that scripts are parsing this is actually bogus
> since it would be expecting decimal there and you'd actually be doing
> them a favor by breaking if they can't handle the "0x" since you've
> changed it to hex. I know the comment says not to change old fields,
> but the microcode field hasn't hit Linus' tree yet, either.
Right, either way I don't seem to care too much. The only thing I care
about is having ucode revision in hex in all places, with or without the
"0x" prefix.
So what do the others think, let's take a poll here. :-)
--
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
next prev parent reply other threads:[~2011-10-18 9:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 15:25 [PATCH 0/2] x86, microcode: AMD adjustments Borislav Petkov
2011-10-17 15:25 ` [PATCH 1/2] x86, microcode: Correct microcode revision format Borislav Petkov
2011-10-18 6:50 ` David Rientjes
2011-10-18 7:51 ` Borislav Petkov
2011-10-18 8:14 ` David Rientjes
2011-10-18 9:48 ` Borislav Petkov [this message]
2011-10-18 15:13 ` Andi Kleen
2011-10-18 15:49 ` Borislav Petkov
2011-10-17 15:25 ` [PATCH 2/2] x86, microcode, AMD: Add microcode revision to /proc/cpuinfo Borislav Petkov
2011-10-18 6:25 ` Ingo Molnar
2011-10-19 14:20 ` Borislav Petkov
2011-10-23 11:48 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111018094831.GB17076@aftab \
--to=bp@amd64.org \
--cc=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rientjes@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.