lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject答复: [tip:x86/cpu] x86/cpu: Create Zhaoxin p rocessors architecture support file
Date
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
\
 
 \ /
  Last update: 2019-06-25 08:20    [W:0.060 / U:19.156 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site