aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@mailshack.com>2008-04-01 11:41:26 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-26 13:21:16 -0400
commit2aba6925fdb96428d1129a61b1233597a03a387b (patch)
tree9ab7d292e681012c43671dd207b20e2c6a10ebcb
parent77b9bd9c49442407804c37bcc82021a35277f83c (diff)
x86: switch 64-bit to generic find_first_bit
Switch x86_64 to generic find_first_bit. The x86_64-specific implementation is not removed. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/lib/bitops_64.c2
-rw-r--r--include/asm-x86/bitops_64.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1a69b68ff6cc..700447738e73 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -78,7 +78,7 @@ config GENERIC_BUG
78 depends on BUG 78 depends on BUG
79 79
80config GENERIC_FIND_FIRST_BIT 80config GENERIC_FIND_FIRST_BIT
81 def_bool X86_32 81 def_bool y
82 82
83config GENERIC_FIND_NEXT_BIT 83config GENERIC_FIND_NEXT_BIT
84 def_bool y 84 def_bool y
diff --git a/arch/x86/lib/bitops_64.c b/arch/x86/lib/bitops_64.c
index 0eeb704d2513..568467d390c0 100644
--- a/arch/x86/lib/bitops_64.c
+++ b/arch/x86/lib/bitops_64.c
@@ -1,3 +1,4 @@
1#ifndef CONFIG_GENERIC_FIND_FIRST_BIT
1#include <linux/bitops.h> 2#include <linux/bitops.h>
2 3
3#undef find_first_zero_bit 4#undef find_first_zero_bit
@@ -105,3 +106,4 @@ long find_first_bit(const unsigned long * addr, unsigned long size)
105 106
106EXPORT_SYMBOL(find_first_bit); 107EXPORT_SYMBOL(find_first_bit);
107EXPORT_SYMBOL(find_first_zero_bit); 108EXPORT_SYMBOL(find_first_zero_bit);
109#endif
diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h
index d13352087191..4081d7ecc2bd 100644
--- a/include/asm-x86/bitops_64.h
+++ b/include/asm-x86/bitops_64.h
@@ -5,6 +5,7 @@
5 * Copyright 1992, Linus Torvalds. 5 * Copyright 1992, Linus Torvalds.
6 */ 6 */
7 7
8#ifndef CONFIG_GENERIC_FIND_FIRST_BIT
8extern long find_first_zero_bit(const unsigned long *addr, unsigned long size); 9extern long find_first_zero_bit(const unsigned long *addr, unsigned long size);
9extern long find_first_bit(const unsigned long *addr, unsigned long size); 10extern long find_first_bit(const unsigned long *addr, unsigned long size);
10 11
@@ -24,6 +25,7 @@ static inline long __scanbit(unsigned long val, unsigned long max)
24 ((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG \ 25 ((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG \
25 ? (__scanbit(~*(unsigned long *)(addr), (size))) \ 26 ? (__scanbit(~*(unsigned long *)(addr), (size))) \
26 : find_first_zero_bit((addr), (size)))) 27 : find_first_zero_bit((addr), (size))))
28#endif
27 29
28static inline void set_bit_string(unsigned long *bitmap, unsigned long i, 30static inline void set_bit_string(unsigned long *bitmap, unsigned long i,
29 int len) 31 int len)