ia64/linux-2.6.18-xen.hg

changeset 483:2ffc78135e7f

xen/x86: simplify synch_test_bit()

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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 18 11:24:01 2008 +0000 (2008-03-18)
parents f619448beab5
children 24d797fe8251
files include/asm-i386/mach-xen/asm/synch_bitops.h
line diff
     1.1 --- a/include/asm-i386/mach-xen/asm/synch_bitops.h	Tue Mar 18 11:22:54 2008 +0000
     1.2 +++ b/include/asm-i386/mach-xen/asm/synch_bitops.h	Tue Mar 18 11:24:01 2008 +0000
     1.3 @@ -119,26 +119,7 @@ static inline unsigned long __synch_cmpx
     1.4  	return old;
     1.5  }
     1.6  
     1.7 -static __always_inline int synch_const_test_bit(int nr,
     1.8 -						const volatile void * addr)
     1.9 -{
    1.10 -    return ((1UL << (nr & 31)) & 
    1.11 -            (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
    1.12 -}
    1.13 -
    1.14 -static __inline__ int synch_var_test_bit(int nr, volatile void * addr)
    1.15 -{
    1.16 -    int oldbit;
    1.17 -    __asm__ __volatile__ (
    1.18 -        "btl %2,%1\n\tsbbl %0,%0"
    1.19 -        : "=r" (oldbit) : "m" (ADDR), "Ir" (nr) );
    1.20 -    return oldbit;
    1.21 -}
    1.22 -
    1.23 -#define synch_test_bit(nr,addr) \
    1.24 -(__builtin_constant_p(nr) ? \
    1.25 - synch_const_test_bit((nr),(addr)) : \
    1.26 - synch_var_test_bit((nr),(addr)))
    1.27 +#define synch_test_bit test_bit
    1.28  
    1.29  #define synch_cmpxchg_subword synch_cmpxchg
    1.30