diff options
-rw-r--r-- | include/asm-mips/bitops.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 0d3373f64920..5478d947e289 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -240,6 +240,8 @@ static inline int test_and_set_bit(unsigned long nr, | |||
240 | unsigned short bit = nr & SZLONG_MASK; | 240 | unsigned short bit = nr & SZLONG_MASK; |
241 | unsigned long res; | 241 | unsigned long res; |
242 | 242 | ||
243 | smp_llsc_mb(); | ||
244 | |||
243 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 245 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
244 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 246 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
245 | unsigned long temp; | 247 | unsigned long temp; |
@@ -308,6 +310,8 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
308 | unsigned short bit = nr & SZLONG_MASK; | 310 | unsigned short bit = nr & SZLONG_MASK; |
309 | unsigned long res; | 311 | unsigned long res; |
310 | 312 | ||
313 | smp_llsc_mb(); | ||
314 | |||
311 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 315 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
312 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 316 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
313 | unsigned long temp; | 317 | unsigned long temp; |
@@ -396,6 +400,8 @@ static inline int test_and_change_bit(unsigned long nr, | |||
396 | unsigned short bit = nr & SZLONG_MASK; | 400 | unsigned short bit = nr & SZLONG_MASK; |
397 | unsigned long res; | 401 | unsigned long res; |
398 | 402 | ||
403 | smp_llsc_mb(); | ||
404 | |||
399 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 405 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
400 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 406 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
401 | unsigned long temp; | 407 | unsigned long temp; |