blob: 6a211f40665c02c8e2083b4966eb9c0d0616e9fb [file] [log] [blame]
Peter Zijlstra1527bc82010-02-01 15:03:07 +01001#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
2#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
3
4#include <asm/types.h>
5
Borislav Petkov4677d4a2010-05-03 14:57:11 +02006static inline unsigned int __arch_hweight32(unsigned int w)
Borislav Petkovd61931d2010-03-05 17:34:46 +01007{
8 return __sw_hweight32(w);
9}
Peter Zijlstra1527bc82010-02-01 15:03:07 +010010
Borislav Petkov4677d4a2010-05-03 14:57:11 +020011static inline unsigned int __arch_hweight16(unsigned int w)
Borislav Petkovd61931d2010-03-05 17:34:46 +010012{
13 return __sw_hweight16(w);
14}
15
Borislav Petkov4677d4a2010-05-03 14:57:11 +020016static inline unsigned int __arch_hweight8(unsigned int w)
Borislav Petkovd61931d2010-03-05 17:34:46 +010017{
18 return __sw_hweight8(w);
19}
20
Borislav Petkov4677d4a2010-05-03 14:57:11 +020021static inline unsigned long __arch_hweight64(__u64 w)
Borislav Petkovd61931d2010-03-05 17:34:46 +010022{
23 return __sw_hweight64(w);
24}
Peter Zijlstra1527bc82010-02-01 15:03:07 +010025#endif /* _ASM_GENERIC_BITOPS_HWEIGHT_H_ */