Commit 43e6ae6d9f08304682294c14c6b7f2b2441668e7
1 parent
f1e39a4a61
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 2 additions and 7 deletions Side-by-side Diff
arch/mips/include/asm/system.h
... | ... | @@ -66,16 +66,11 @@ |
66 | 66 | #define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0) |
67 | 67 | #endif |
68 | 68 | |
69 | -#ifdef CONFIG_CPU_HAS_LLSC | |
70 | -#define __clear_software_ll_bit() do { } while (0) | |
71 | -#else | |
72 | -extern unsigned long ll_bit; | |
73 | - | |
74 | 69 | #define __clear_software_ll_bit() \ |
75 | 70 | do { \ |
76 | - ll_bit = 0; \ | |
71 | + if (!__builtin_constant_p(cpu_has_llsc) || !cpu_has_llsc) \ | |
72 | + ll_bit = 0; \ | |
77 | 73 | } while (0) |
78 | -#endif | |
79 | 74 | |
80 | 75 | #define switch_to(prev, next, last) \ |
81 | 76 | do { \ |