summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-16 09:40:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-17 07:43:58 +0200
commit227a20fe31c6a03795a202f95af95fb371951963 (patch)
tree3dfdc7053db8f36bb972fe88bd633effebacda5a /arch/x86
parent0d57d70dfbb753c0f017daff42a5e285c249f5b8 (diff)
downloadbarebox-227a20fe31c6a03795a202f95af95fb371951963.tar.gz
consistently use the same bitops.h file
We have many variants of the same bitops.h file. Consistently use the same file for all architectures which completely use the generic bitops versions. Some architectures had static inline versions of functions identically to the generic versions, these are removed and the generic versions are used directly now. Also several architectures depend on the generic find_*_bit functions but didn't have the GENERIC_FIND_NEXT_BIT Kconfig option selected. This is added where needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/bitops.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index e525812..e77ab83 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -12,20 +12,24 @@
*
*/
-/**
- * @file
- * @brief x86 bit operations
- *
- * This file is required only to make all sources happy including
- * 'linux/bitops.h'
- */
+#ifndef _ASM_BITOPS_H_
+#define _ASM_BITOPS_H_
-#ifndef _ASM_X86_BITOPS_H_
-#define _ASM_X86_BITOPS_H_
-
-#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/__ffs.h>
-#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/ffs.h>
+#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/ffz.h>
+#include <asm-generic/bitops/hweight.h>
+#include <asm-generic/bitops/fls64.h>
+#include <asm-generic/bitops/find.h>
+#include <asm-generic/bitops/ops.h>
+
+#define set_bit(x, y) __set_bit(x, y)
+#define clear_bit(x, y) __clear_bit(x, y)
+#define change_bit(x, y) __change_bit(x, y)
+#define test_and_set_bit(x, y) __test_and_set_bit(x, y)
+#define test_and_clear_bit(x, y) __test_and_clear_bit(x, y)
+#define test_and_change_bit(x, y) __test_and_change_bit(x, y)
-#endif /* _ASM_X86_BITOPS_H_ */
+#endif /* _ASM_BITOPS_H_ */