summaryrefslogtreecommitdiffstats
path: root/scripts/include/linux/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/include/linux/bitops.h')
-rw-r--r--scripts/include/linux/bitops.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/scripts/include/linux/bitops.h b/scripts/include/linux/bitops.h
index 5ad9ee1dd7..60f5c5b4f9 100644
--- a/scripts/include/linux/bitops.h
+++ b/scripts/include/linux/bitops.h
@@ -4,12 +4,7 @@
#include <asm/types.h>
#include <linux/kernel.h>
#include <linux/compiler.h>
-
-#ifndef __WORDSIZE
-#define __WORDSIZE (__SIZEOF_LONG__ * 8)
-#endif
-
-#define BITS_PER_LONG __WORDSIZE
+#include <asm-generic/bitsperlong.h>
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
@@ -19,10 +14,6 @@
#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