]> err.no Git - linux-2.6/commitdiff
x86: switch 64-bit to generic find_first_bit
authorAlexander van Heukelum <heukelum@mailshack.com>
Tue, 1 Apr 2008 15:41:26 +0000 (17:41 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Apr 2008 17:21:16 +0000 (19:21 +0200)
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>
arch/x86/Kconfig
arch/x86/lib/bitops_64.c
include/asm-x86/bitops_64.h

index 1a69b68ff6cc6b1bec389523bb47bf924a776245..700447738e734f1044e88201e507c19ac088f6ea 100644 (file)
@@ -78,7 +78,7 @@ config GENERIC_BUG
        depends on BUG
 
 config GENERIC_FIND_FIRST_BIT
-       def_bool X86_32
+       def_bool y
 
 config GENERIC_FIND_NEXT_BIT
        def_bool y
index 0eeb704d25133e4a91bb920fe106822dd4a5c1b2..568467d390c0c8baacf6996e899f5804a086e35c 100644 (file)
@@ -1,3 +1,4 @@
+#ifndef CONFIG_GENERIC_FIND_FIRST_BIT
 #include <linux/bitops.h>
 
 #undef find_first_zero_bit
@@ -105,3 +106,4 @@ long find_first_bit(const unsigned long * addr, unsigned long size)
 
 EXPORT_SYMBOL(find_first_bit);
 EXPORT_SYMBOL(find_first_zero_bit);
+#endif
index d13352087191b7b8a7a6cbd2e02e9ab671917da4..4081d7ecc2bddf3804244488e962b558ed3837df 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright 1992, Linus Torvalds.
  */
 
+#ifndef CONFIG_GENERIC_FIND_FIRST_BIT
 extern long find_first_zero_bit(const unsigned long *addr, unsigned long size);
 extern long find_first_bit(const unsigned long *addr, unsigned long size);
 
@@ -24,6 +25,7 @@ static inline long __scanbit(unsigned long val, unsigned long max)
        ((__builtin_constant_p((size)) && (size) <= BITS_PER_LONG       \
          ? (__scanbit(~*(unsigned long *)(addr), (size)))              \
          : find_first_zero_bit((addr), (size))))
+#endif
 
 static inline void set_bit_string(unsigned long *bitmap, unsigned long i,
                                  int len)