|
@@ -37,13 +37,6 @@
|
|
#define __EXT "dext "
|
|
#define __EXT "dext "
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/*
|
|
|
|
- * clear_bit() doesn't provide any barrier for the compiler.
|
|
|
|
- */
|
|
|
|
-#define smp_mb__before_clear_bit() smp_mb__before_llsc()
|
|
|
|
-#define smp_mb__after_clear_bit() smp_llsc_mb()
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* These are the "slower" versions of the functions and are in bitops.c.
|
|
* These are the "slower" versions of the functions and are in bitops.c.
|
|
* These functions call raw_local_irq_{save,restore}().
|
|
* These functions call raw_local_irq_{save,restore}().
|
|
@@ -120,7 +113,7 @@ static inline void set_bit(unsigned 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 inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
|
|
static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
|
|
@@ -175,7 +168,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
|
|
*/
|
|
*/
|
|
static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *addr)
|
|
static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *addr)
|
|
{
|
|
{
|
|
- smp_mb__before_clear_bit();
|
|
|
|
|
|
+ smp_mb__before_atomic();
|
|
clear_bit(nr, addr);
|
|
clear_bit(nr, addr);
|
|
}
|
|
}
|
|
|
|
|