mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/bitops: Drop the remnants of hweight{8,16}()
They are no more. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
f7dc086294
commit
e8f0cc77dc
4 files changed
-23
No files matched your search
@@ -86,8 +86,6 @@ bool clear_mask16_timeout(uint16_t mask, volatile void *p,
|
||||
*/
|
||||
#define hweight64(x) generic_hweight64(x)
|
||||
#define hweight32(x) generic_hweight32(x)
|
||||
#define hweight16(x) generic_hweight16(x)
|
||||
#define hweight8(x) generic_hweight8(x)
|
||||
|
||||
#endif /* _ARM_BITOPS_H */
|
||||
/*
|
||||
|
||||
@@ -134,7 +134,5 @@ static inline int test_and_set_bit(unsigned int nr, volatile void *addr)
|
||||
*/
|
||||
#define hweight64(x) __builtin_popcountll(x)
|
||||
#define hweight32(x) __builtin_popcount(x)
|
||||
#define hweight16(x) __builtin_popcount((uint16_t)(x))
|
||||
#define hweight8(x) __builtin_popcount((uint8_t)(x))
|
||||
|
||||
#endif /* _ASM_PPC_BITOPS_H */
|
||||
@@ -483,7 +483,5 @@ static always_inline unsigned int arch_flsl(unsigned long x)
|
||||
*/
|
||||
#define hweight64(x) generic_hweight64(x)
|
||||
#define hweight32(x) generic_hweight32(x)
|
||||
#define hweight16(x) generic_hweight16(x)
|
||||
#define hweight8(x) generic_hweight8(x)
|
||||
|
||||
#endif /* _X86_BITOPS_H */
|
||||
@@ -413,23 +413,6 @@ static inline unsigned int generic_hweight32(unsigned int w)
|
||||
return (w + (w >> 16)) & 0xff;
|
||||
}
|
||||
|
||||
static inline unsigned int generic_hweight16(unsigned int w)
|
||||
{
|
||||
w -= ((w >> 1) & 0x5555);
|
||||
w = (w & 0x3333) + ((w >> 2) & 0x3333);
|
||||
w = (w + (w >> 4)) & 0x0f0f;
|
||||
|
||||
return (w + (w >> 8)) & 0xff;
|
||||
}
|
||||
|
||||
static inline unsigned int generic_hweight8(unsigned int w)
|
||||
{
|
||||
w -= ((w >> 1) & 0x55);
|
||||
w = (w & 0x33) + ((w >> 2) & 0x33);
|
||||
|
||||
return (w + (w >> 4)) & 0x0f;
|
||||
}
|
||||
|
||||
static inline unsigned int generic_hweight64(uint64_t w)
|
||||
{
|
||||
if ( BITS_PER_LONG < 64 )
|
||||
|
||||