summaryrefslogtreecommitdiffstats
path: root/tools/include/linux/bitops.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-19 06:56:57 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-19 06:56:57 +0800
commit3542f6b1836d8940615104e22248bb9b7cf54f5f (patch)
tree6808fae6dfb12bb4b7e5e0df4efbe3e0dae8c537 /tools/include/linux/bitops.h
parentd885d4f3728f386034bb2f7a61b7f2054c49b2d4 (diff)
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff)
downloadop-kernel-dev-3542f6b1836d8940615104e22248bb9b7cf54f5f.zip
op-kernel-dev-3542f6b1836d8940615104e22248bb9b7cf54f5f.tar.gz
Merge 3.19-rc5 into char-misc-next
We want the 3.19-rc5 fixes in here for our testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/include/linux/bitops.h')
-rw-r--r--tools/include/linux/bitops.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h
index 26005a15..5ad9ee1 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
OpenPOWER on IntegriCloud