lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/1] x86/platform/x86: Fix count of CHas on multi-pci-segment arches
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));

?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-03-13 18:50    [W:0.055 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site