MIPS: Rewrite clearing of ll_bit on context switch in C
authorRalf Baechle <ralf@linux-mips.org>
Thu, 17 Sep 2009 00:25:05 +0000 (02:25 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 17 Sep 2009 18:07:49 +0000 (20:07 +0200)
This also means there is now only one implementation not 3 left.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/system.h

index 23f68b40d4bb25170217943fcf35eba7eb69f3d3..cc7262ff0765653cc6fe42254ec90b33c5a1caaa 100644 (file)
@@ -66,16 +66,11 @@ do {                                                                        \
 #define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0)
 #endif
 
-#ifdef CONFIG_CPU_HAS_LLSC
-#define __clear_software_ll_bit() do { } while (0)
-#else
-extern unsigned long ll_bit;
-
 #define __clear_software_ll_bit()                                      \
 do {                                                                   \
-       ll_bit = 0;                                                     \
+       if (!__builtin_constant_p(cpu_has_llsc) || !cpu_has_llsc)       \
+               ll_bit = 0;                                             \
 } while (0)
-#endif
 
 #define switch_to(prev, next, last)                                    \
 do {                                                                   \