|
@@ -15,6 +15,7 @@
|
|
#include <linux/compiler.h>
|
|
#include <linux/compiler.h>
|
|
#include <asm/alternative.h>
|
|
#include <asm/alternative.h>
|
|
#include <asm/rmwcc.h>
|
|
#include <asm/rmwcc.h>
|
|
|
|
+#include <asm/barrier.h>
|
|
|
|
|
|
#if BITS_PER_LONG == 32
|
|
#if BITS_PER_LONG == 32
|
|
# define _BITOPS_LONG_SHIFT 5
|
|
# define _BITOPS_LONG_SHIFT 5
|
|
@@ -102,7 +103,7 @@ static inline void __set_bit(long nr, volatile unsigned long *addr)
|
|
*
|
|
*
|
|
* clear_bit() is atomic and may not be reordered. However, it does
|
|
* clear_bit() is atomic and may not be reordered. However, it does
|
|
* not contain a memory barrier, so if it is used for locking purposes,
|
|
* not contain a memory barrier, so if it is used for locking purposes,
|
|
- * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
|
|
|
|
|
|
+ * you should call smp_mb__before_atomic() and/or smp_mb__after_atomic()
|
|
* in order to ensure changes are visible on other processors.
|
|
* in order to ensure changes are visible on other processors.
|
|
*/
|
|
*/
|
|
static __always_inline void
|
|
static __always_inline void
|
|
@@ -156,9 +157,6 @@ static inline void __clear_bit_unlock(long nr, volatile unsigned long *addr)
|
|
__clear_bit(nr, addr);
|
|
__clear_bit(nr, addr);
|
|
}
|
|
}
|
|
|
|
|
|
-#define smp_mb__before_clear_bit() barrier()
|
|
|
|
-#define smp_mb__after_clear_bit() barrier()
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* __change_bit - Toggle a bit in memory
|
|
* __change_bit - Toggle a bit in memory
|
|
* @nr: the bit to change
|
|
* @nr: the bit to change
|