summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2009-09-17 02:25:05 +0200
committerRalf Baechle <ralf@linux-mips.org>2009-09-17 20:07:49 +0200
commit43e6ae6d9f08304682294c14c6b7f2b2441668e7 (patch)
tree0232f2aab68e6c2d7806878026b87bf5e6ea5df4
parentf1e39a4a616cd9981a9decfd5332fd07a01abb8b (diff)
MIPS: Rewrite clearing of ll_bit on context switch in C
This also means there is now only one implementation not 3 left. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/include/asm/system.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
index 23f68b40d4b..cc7262ff076 100644
--- a/arch/mips/include/asm/system.h
+++ b/arch/mips/include/asm/system.h
@@ -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 { \