diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-20 11:54:53 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-20 11:54:53 -0800 |
commit | 4c971aa78314253cce914ed29e3d90df3326d646 (patch) | |
tree | a9dcf0b1fdc9e1aacff90afb5b3ab79983115dcc /tools/include/linux/bitops.h | |
parent | 4ba24fef3eb3b142197135223b90ced2f319cd53 (diff) | |
parent | 290b799c390d77d27effee3ce312203aaa32ee74 (diff) | |
download | lwn-4c971aa78314253cce914ed29e3d90df3326d646.tar.gz lwn-4c971aa78314253cce914ed29e3d90df3326d646.zip |
Merge branch 'next' into for-linus
Second round of updates for 3.20.
Diffstat (limited to 'tools/include/linux/bitops.h')
-rw-r--r-- | tools/include/linux/bitops.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h index 26005a15e7e2..5ad9ee1dd7f6 100644 --- a/tools/include/linux/bitops.h +++ b/tools/include/linux/bitops.h @@ -1,9 +1,9 @@ #ifndef _TOOLS_LINUX_BITOPS_H_ #define _TOOLS_LINUX_BITOPS_H_ +#include <asm/types.h> #include <linux/kernel.h> #include <linux/compiler.h> -#include <asm/hweight.h> #ifndef __WORDSIZE #define __WORDSIZE (__SIZEOF_LONG__ * 8) @@ -19,6 +19,11 @@ #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32)) #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE) +extern unsigned int __sw_hweight8(unsigned int w); +extern unsigned int __sw_hweight16(unsigned int w); +extern unsigned int __sw_hweight32(unsigned int w); +extern unsigned long __sw_hweight64(__u64 w); + /* * Include this here because some architectures need generic_ffs/fls in * scope |