From: Andi Kleen <ak@linux.intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <andi@firstfloor.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH 1/3] x86, intel: Output microcode revision
Date: Wed, 25 May 2011 09:54:36 -0700 [thread overview]
Message-ID: <20110525165436.GA14958@tassilo.jf.intel.com> (raw)
In-Reply-To: <20110525065451.GC429@elte.hu>
On Wed, May 25, 2011 at 08:54:51AM +0200, Ingo Molnar wrote:
> > + /* CPU update signature */
> > + u32 x86_cpu_update;
>
> This should be cpu_microcode_version instead. We already know its x86 so the
> x86_ prefix is superfluous. 'cpu_update' is also rather ambigious and does not
I followed the convention of the other fields in cpu_data, but I'll drop
the prefix.
"cpu update" was the name that was suggested to me. Sorry if it's a
bit vague. Apparently calling it microcode is not politically correct.
I'll keep it for now. If you want to really change it please send
another email.
>
> So, during the course of developing this, did it occur to you that other x86
> CPUs should fill in this information as well?
Yes, it did in fact, but I hope someone else will do that because I have no way to test it.
> > - /* see notes above for revision 1.07. Apparent chip bug */
This particular code pattern has no chip bug. The CPUID is required
by the documentation! So whoever wrote it didn't read the documentation.
So yes I dropped that obviously bogus comment.
>
> Why? If you think it's not a bug (but got documented meanwhile as the official
It always was documented this way.
> way of updating the microcode and reading out the version) then update the
> comments in a *separate* patch, and update the *other* reference to it as well.
I'm not sure about the other references. The documentation just
states the CPUID is needed for reading the revision.
Anyways I'll just leave the comment around for now.
> > +
> > + seq_printf(m, "\n");
>
> This too should say microcode version.
>
> Also, please move the field to the logical place, next to "stepping:". The
> argument about parsers is bogus - anyone parsing /proc/cpuinfo is not in a
> fastpath, full stop.
The rationale was not cycles, but if someone was stupid enough
to hardcode the line number offsets while parsing. You never know with user
space /proc parsers and assuming the worst is always the best.
I thought it was safest to add new fields at the end.
>
> Also, the above sequence is rather suboptimal to begin with - we can and only
> want to execute a *single* seq_printf() there.
Sorry I don't understand the comment. Anyways as you say above
it's no fast path, so it shouldn't matter.
> Please factor out the reading of the microcode version - you have now created
> two duplicated open-coded versions of it in cpu.c and microcode_intel.c, with
> mismatching comments - not good.
Huh? There's only a single one now.
> it would be nice to put a check:
>
> WARN_ON_ONCE(val[1] != c->x86_cpu_update);
Ok.
-Andi
next prev parent reply other threads:[~2011-05-25 16:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 23:03 [PATCH 1/3] x86, intel: Output microcode revision Andi Kleen
2011-05-24 23:03 ` [PATCH 2/3] x86, intel: Use cpu_update for Atom errata check Andi Kleen
2011-05-25 6:59 ` Ingo Molnar
2011-05-24 23:03 ` [PATCH 3/3] coretemp: Get microcode revision from cpu_data Andi Kleen
2011-05-24 23:58 ` Yu, Fenghua
2011-05-25 0:39 ` [PATCH 1/3] x86, intel: Output microcode revision Fenghua Yu
[not found] ` <BANLkTikoa494-bRWtbbXuE6eqLuH0ZPUTg@mail.gmail.com>
[not found] ` <493994B35A117E4F832F97C4719C4C04011E214EC2@orsmsx505.amr.corp.intel.com>
2011-05-25 0:47 ` Andi Kleen
2011-05-25 6:54 ` Ingo Molnar
2011-05-25 8:00 ` Borislav Petkov
2011-05-25 9:05 ` Ingo Molnar
2011-05-25 10:50 ` Borislav Petkov
2011-05-25 11:28 ` Ingo Molnar
2011-05-25 21:08 ` Borislav Petkov
2011-05-25 11:30 ` Ingo Molnar
2011-05-25 16:54 ` Andi Kleen [this message]
2011-05-25 18:59 ` Ingo Molnar
2011-05-25 19:13 ` Andi Kleen
2011-05-25 7:06 ` Ingo Molnar
2011-05-25 16:06 ` Henrique de Moraes Holschuh
2011-05-25 16:58 ` Andi Kleen
2011-05-25 18:24 ` Ingo Molnar
2011-05-25 19:04 ` Henrique de Moraes Holschuh
2011-05-25 19:36 ` Ingo Molnar
2011-05-25 19:05 ` Andi Kleen
2011-05-25 19:45 ` Ingo Molnar
2011-05-29 10:21 ` Jan Ceuleers
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=20110525165436.GA14958@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox