diff options
author | Jan Beulich <jbeulich@novell.com> | 2008-03-14 07:56:32 +0000 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 17:41:13 +0200 |
commit | f7d909d5475bb27d261389a3902860e086b0d4c9 (patch) | |
tree | bde83b375fd4df1ec41e0665ea6fc705e6bc5b48 | |
parent | acb5b8a2dd0f901463d075382ea548935e679f4e (diff) | |
download | linux-3.10-f7d909d5475bb27d261389a3902860e086b0d4c9.tar.gz linux-3.10-f7d909d5475bb27d261389a3902860e086b0d4c9.tar.bz2 linux-3.10-f7d909d5475bb27d261389a3902860e086b0d4c9.zip |
x86: simplify sync_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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/asm-x86/sync_bitops.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/include/asm-x86/sync_bitops.h b/include/asm-x86/sync_bitops.h index 6b775c90566..bc249f40e0e 100644 --- a/include/asm-x86/sync_bitops.h +++ b/include/asm-x86/sync_bitops.h @@ -123,26 +123,7 @@ static inline int sync_test_and_change_bit(int nr, volatile unsigned long* addr) return oldbit; } -static __always_inline int sync_constant_test_bit(int nr, const volatile unsigned long *addr) -{ - return ((1UL << (nr & 31)) & - (((const volatile unsigned int *)addr)[nr >> 5])) != 0; -} - -static inline int sync_var_test_bit(int nr, const volatile unsigned long * addr) -{ - int oldbit; - - __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#define sync_test_bit(nr,addr) \ - (__builtin_constant_p(nr) ? \ - sync_constant_test_bit((nr),(addr)) : \ - sync_var_test_bit((nr),(addr))) +#define sync_test_bit test_bit #undef ADDR |