public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
To: 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>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"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 06:19:15 +0000	[thread overview]
Message-ID: <505e342c814e4b29ae2a23a6eaf63ea7@zhaoxin.com> (raw)
In-Reply-To: <7ec724a310a710e6415320ff530daba0e1d30505.camel@perches.com>

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.

Thanks
TonyWWang-oc

  reply	other threads:[~2019-06-25  6:19 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 [this message]
2019-06-25  6:31       ` 答复: " Thomas Gleixner
2019-06-25  8:15         ` 答复: " Tony W Wang-oc

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=505e342c814e4b29ae2a23a6eaf63ea7@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