summaryrefslogtreecommitdiffstats
path: root/tools/include/asm-generic/bitops/arch_hweight.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2016-07-18 23:13:22 +0200
committerArnaldo Carvalho de Melo2016-07-18 23:33:41 +0200
commitde1e17b1d0c81be472039798698b517c8a68b516 (patch)
tree62dd99a543f9f37fb390be7ffc393907b9b82a1c /tools/include/asm-generic/bitops/arch_hweight.h
parentRemove: kernel unistd*h files from perf's MANIFEST, not used (diff)
downloadkernel-qcow2-linux-de1e17b1d0c81be472039798698b517c8a68b516.tar.gz
kernel-qcow2-linux-de1e17b1d0c81be472039798698b517c8a68b516.tar.xz
kernel-qcow2-linux-de1e17b1d0c81be472039798698b517c8a68b516.zip
tools: Copy the bitops files accessed from the kernel and check for drift
copy some more kernel files accessed from tools/, check for drift. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-omz8xdyvvxgjiuqzwj6ecm6j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include/asm-generic/bitops/arch_hweight.h')
-rw-r--r--tools/include/asm-generic/bitops/arch_hweight.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/include/asm-generic/bitops/arch_hweight.h b/tools/include/asm-generic/bitops/arch_hweight.h
index 318bb2b202b0..6a211f40665c 100644
--- a/tools/include/asm-generic/bitops/arch_hweight.h
+++ b/tools/include/asm-generic/bitops/arch_hweight.h
@@ -1 +1,25 @@
-#include "../../../../include/asm-generic/bitops/arch_hweight.h"
+#ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
+#define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
+
+#include <asm/types.h>
+
+static inline unsigned int __arch_hweight32(unsigned int w)
+{
+ return __sw_hweight32(w);
+}
+
+static inline unsigned int __arch_hweight16(unsigned int w)
+{
+ return __sw_hweight16(w);
+}
+
+static inline unsigned int __arch_hweight8(unsigned int w)
+{
+ return __sw_hweight8(w);
+}
+
+static inline unsigned long __arch_hweight64(__u64 w)
+{
+ return __sw_hweight64(w);
+}
+#endif /* _ASM_GENERIC_BITOPS_HWEIGHT_H_ */