From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: "Kroening, Gary" <gary.kroening@hpe.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"peterz@infradead.org" <peterz@infradead.org>,
"Travis, Mike" <mike.travis@hpe.com>,
"Banman, Andrew" <abanman@hpe.com>,
"Sivanich, Dimitri" <dimitri.sivanich@hpe.com>,
"Anderson, Russ" <russ.anderson@hpe.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] x86/platform/x86: Fix count of CHas on multi-pci-segment arches
Date: Tue, 13 Mar 2018 19:50:44 +0200 [thread overview]
Message-ID: <CAHp75VecsfSbno8xOX_oSQ72KxtRpG9+XnTttFfL-LzjSS611A@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VfTyLfzGmFTknjk4nfbk-7qicFU9QoEjzmiSMhsty8Ffg@mail.gmail.com>
On Tue, Mar 13, 2018 at 7:49 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Mar 13, 2018 at 7:46 PM, Andy Shevchenko
> <andy.shevchenko@gmail.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
prev parent reply other threads:[~2018-03-13 17:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 20:33 [PATCH 1/1] x86/platform/x86: Fix count of CHas on multi-pci-segment arches Kroening, Gary
2018-03-13 1:42 ` Liang, Kan
2018-03-13 5:06 ` Kroening, Gary
2018-03-13 12:28 ` Liang, Kan
2018-03-13 5:24 ` Kroening, Gary
2018-03-13 15:58 ` Andy Shevchenko
2018-03-13 16:00 ` Andy Shevchenko
2018-03-13 17:15 ` Liang, Kan
2018-03-13 17:22 ` Andy Shevchenko
2018-03-13 17:28 ` Liang, Kan
2018-03-13 17:31 ` Andy Shevchenko
2018-03-13 17:16 ` Liang, Kan
2018-03-13 17:42 ` Liang, Kan
2018-03-13 17:46 ` Andy Shevchenko
2018-03-13 17:49 ` Andy Shevchenko
2018-03-13 17:50 ` Andy Shevchenko [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=CAHp75VecsfSbno8xOX_oSQ72KxtRpG9+XnTttFfL-LzjSS611A@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=abanman@hpe.com \
--cc=dimitri.sivanich@hpe.com \
--cc=gary.kroening@hpe.com \
--cc=hpa@zytor.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.travis@hpe.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=russ.anderson@hpe.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).