[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VecsfSbno8xOX_oSQ72KxtRpG9+XnTttFfL-LzjSS611A@mail.gmail.com>
Date: Tue, 13 Mar 2018 19:50:44 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: "Kroening, Gary" <gary.kroening@....com>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"peterz@...radead.org" <peterz@...radead.org>,
"Travis, Mike" <mike.travis@....com>,
"Banman, Andrew" <abanman@....com>,
"Sivanich, Dimitri" <dimitri.sivanich@....com>,
"Anderson, Russ" <russ.anderson@....com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] x86/platform/x86: Fix count of CHas on
multi-pci-segment arches
On Tue, Mar 13, 2018 at 7:49 PM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Tue, Mar 13, 2018 at 7:46 PM, Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
>>>>>> + pci_read_config_dword(dev, SKX_CAPID6, &val);
>>>>>> + return bitmap_weight((unsigned long *)&val, SKX_CHA_BIT_WIDTH);
>
> Forgot about hweight32(). Can you use that one directly?
>
> hweight32(x & (BIT(_WIDTH) - 1));
>
> ?
Or even provide
#define SKX_CHA_BIT_MASK GENMASK(...)
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists