From: Hans Rosenfeld <hans.rosenfeld@amd.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] AMD errata checking framework
Date: Mon, 14 Jun 2010 14:33:42 +0200 [thread overview]
Message-ID: <20100614123342.GB746@escobedo.osrc.amd.com> (raw)
In-Reply-To: <4C129927.4060502@zytor.com>
On Fri, Jun 11, 2010 at 04:14:31PM -0400, H. Peter Anvin wrote:
> On 06/11/2010 06:25 AM, Hans Rosenfeld wrote:
> > +
> > +/*
> > + * Check for the presence of an AMD erratum.
> > + * Arguments are defined in processor.h for each known erratum.
> > + */
> > +bool cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, bool osvw, ...)
> > +{
>
> /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c: In
> function ?cpu_has_amd_erratum?:
> /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:635: error:
> expected expression before ?do?
> /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:636: error:
> expected expression before ?do?
> /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:632:
> warning: unused variable ?t?
Umpf. It seems like I underestimated the brokenness of rdmsrl() etc..
A new patch set will follow shortly. I also added va_end() calls where
necessary and replaced static_cpu_has() with cpu_has().
> Also, the use of divide and modulo when shifts and masks work are
> generally frowned upon in Linux as a matter of style.
While I agree in principle, I think that in this special case the
divide and modulo by 64 make it easier to understand what the code
does on the first look. But if you insist I will send another patch
set that replaces divide and modulo with shifts and masks.
Hans
--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
next prev parent reply other threads:[~2010-06-14 12:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1276262713-26864-1-git-send-email-hans.rosenfeld@amd.com>
2010-06-11 20:14 ` H. Peter Anvin
2010-06-14 12:33 ` Hans Rosenfeld [this message]
2010-06-15 18:16 ` H. Peter Anvin
2010-06-11 20:15 ` H. Peter Anvin
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=20100614123342.GB746@escobedo.osrc.amd.com \
--to=hans.rosenfeld@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®