From: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Joe Perches <joe@perches.com>,
"Herry Yang(BJ-RD)" <HerryYang@zhaoxin.com>,
"Cooper Yan(BJ-RD)" <CooperYan@zhaoxin.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"lenb@kernel.org" <lenb@kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"Qiyuan Wang(BJ-RD)" <QiyuanWang@zhaoxin.com>,
"mingo@kernel.org" <mingo@kernel.org>,
David Wang <DavidWang@zhaoxin.com>,
"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
"linux-tip-commits@vger.kernel.org"
<linux-tip-commits@vger.kernel.org>
Subject: 答复: 答复: [tip:x86/cpu] x86/cpu: Create Zhaoxin processors architecture support file
Date: Tue, 25 Jun 2019 08:15:01 +0000 [thread overview]
Message-ID: <540fd8d21fd043f6a8b49b018fc3b03e@zhaoxin.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1906250826550.32342@nanos.tec.linutronix.de>
On Tue, 25 Jun 2019, Thomas Gleixner wrote:
> Tony,
>
> On Tue, 25 Jun 2019, Tony W Wang-oc wrote:
> > On Sun, Jun 23, 2019, Joe Perches wrote:
> > > > x86/cpu: Create Zhaoxin processors architecture support file
> > > >
> > > []
> > > > diff --git a/arch/x86/kernel/cpu/zhaoxin.c
> b/arch/x86/kernel/cpu/zhaoxin.c
> > > []
> > > > +static void init_zhaoxin_cap(struct cpuinfo_x86 *c)
> > > > +{
> > > > + u32 lo, hi;
> > > > +
> > > > + /* Test for Extended Feature Flags presence */
> > > > + if (cpuid_eax(0xC0000000) >= 0xC0000001) {
> > > > + u32 tmp = cpuid_edx(0xC0000001);
> > > > +
> > > > + /* Enable ACE unit, if present and disabled */
> > > > + if ((tmp & (ACE_PRESENT | ACE_ENABLED)) == ACE_PRESENT) {
> > >
> > > trivia:
> > >
> > > Perhaps this is more intelligible for humans to read
> > > and it deduplicates the comment as:
> > >
> > > if ((tmp & ACE_PRESENT) && !(tmp & ACE_ENABLED))
> > >
> > > The compiler produces the same object code.
> > >
> >
> > Thanks for the trivia, I will change this in the next version patch set.
>
> as you might have noticed from the tip bot commit notification mail, your
> patch set has been merged into the tip tree and is queued for the 5.3 merge
> window. So a new patch set is pointless. If at all then you can send a
> delta patch.
>
> Though I have to say, that I prefer the existing check:
>
> > > > + if ((tmp & (ACE_PRESENT | ACE_ENABLED)) == ACE_PRESENT) {
>
> It's pretty clear, but that's really a matter of personal preference. So
> from my side there is nothing to do at all.
Got it, I will not change this code.
Thanks
TonyWWang-oc
prev parent reply other threads:[~2019-06-25 8:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 8:37 [PATCH v2 1/3] x86/cpu: Create Zhaoxin processors architecture support file Tony W Wang-oc
2019-06-20 16:29 ` Borislav Petkov
2019-06-22 10:16 ` [tip:x86/cpu] " tip-bot for Tony W Wang-oc
2019-06-22 18:01 ` Joe Perches
2019-06-25 6:19 ` 答复: " Tony W Wang-oc
2019-06-25 6:31 ` Thomas Gleixner
2019-06-25 8:15 ` Tony W Wang-oc [this message]
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=540fd8d21fd043f6a8b49b018fc3b03e@zhaoxin.com \
--to=tonywwang-oc@zhaoxin.com \
--cc=CooperYan@zhaoxin.com \
--cc=DavidWang@zhaoxin.com \
--cc=HerryYang@zhaoxin.com \
--cc=QiyuanWang@zhaoxin.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rjw@rjwysocki.net \
--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