IA64: Slim down __clear_bit_unlock __clear_bit_unlock does not need to perform atomic operations on the variable. Avoid a cmpxchg and simply do a store with release semantics. Add a barrier to be safe that the compiler does not do funky things. Signed-off-by: Christoph Lameter Acked-by: Nick Piggin --- include/asm-ia64/bitops.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) Index: linux-2.6/include/asm-ia64/bitops.h =================================================================== --- linux-2.6.orig/include/asm-ia64/bitops.h 2007-10-19 04:05:38.000000000 -0700 +++ linux-2.6/include/asm-ia64/bitops.h 2007-10-19 10:50:34.000000000 -0700 @@ -118,14 +118,6 @@ clear_bit_unlock (int nr, volatile void } /** - * __clear_bit_unlock - Non-atomically clear a bit with release - * - * This is like clear_bit_unlock, but the implementation may use a non-atomic - * store (this one uses an atomic, however). - */ -#define __clear_bit_unlock clear_bit_unlock - -/** * __clear_bit - Clears a bit in memory (non-atomic version) */ static __inline__ void @@ -137,6 +129,16 @@ __clear_bit (int nr, volatile void *addr } /** + * __clear_bit_unlock - Non-atomically clear a bit with release + */ +static __inline__ void +__clear_bit_unlock (int nr, volatile void *addr) +{ + barrier(); + __clear_bit(nr, addr); +} + +/** * change_bit - Toggle a bit in memory * @nr: Bit to clear * @addr: Address to start counting from