]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
xen/x86: simplify synch_test_bit()
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 11:24:01 +0000 (11:24 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 11:24:01 +0000 (11:24 +0000)
There really is no need for a redundant implementation here, just keep
the alternative name for allowing consumers to use consistent naming.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
include/asm-i386/mach-xen/asm/synch_bitops.h

index f2e5f853e25cf65020942a60641e91593137c754..be5f59be8e3dd5b66ee6f30d96f974fccc16da1f 100644 (file)
@@ -119,26 +119,7 @@ static inline unsigned long __synch_cmpxchg(volatile void *ptr,
        return old;
 }
 
-static __always_inline int synch_const_test_bit(int nr,
-                                               const volatile void * addr)
-{
-    return ((1UL << (nr & 31)) & 
-            (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
-}
-
-static __inline__ int synch_var_test_bit(int nr, volatile void * addr)
-{
-    int oldbit;
-    __asm__ __volatile__ (
-        "btl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit) : "m" (ADDR), "Ir" (nr) );
-    return oldbit;
-}
-
-#define synch_test_bit(nr,addr) \
-(__builtin_constant_p(nr) ? \
- synch_const_test_bit((nr),(addr)) : \
- synch_var_test_bit((nr),(addr)))
+#define synch_test_bit test_bit
 
 #define synch_cmpxchg_subword synch_cmpxchg