Commit f4c6b6bc5a4fc8d607f2d89369008c85a3a12a8b
1 parent
6eb10bc9e2
Exists in
master
and in
4 other branches
MIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Showing 4 changed files with 12 additions and 9 deletions Side-by-side Diff
arch/mips/include/asm/system.h
... | ... | @@ -63,11 +63,23 @@ |
63 | 63 | #define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0) |
64 | 64 | #endif |
65 | 65 | |
66 | +#ifdef CONFIG_CPU_HAS_LLSC | |
67 | +#define __clear_software_ll_bit() do { } while (0) | |
68 | +#else | |
69 | +extern unsigned long ll_bit; | |
70 | + | |
71 | +#define __clear_software_ll_bit() \ | |
72 | +do { \ | |
73 | + ll_bit = 0; \ | |
74 | +} while (0) | |
75 | +#endif | |
76 | + | |
66 | 77 | #define switch_to(prev, next, last) \ |
67 | 78 | do { \ |
68 | 79 | __mips_mt_fpaff_switch_to(prev); \ |
69 | 80 | if (cpu_has_dsp) \ |
70 | 81 | __save_dsp(prev); \ |
82 | + __clear_software_ll_bit(); \ | |
71 | 83 | (last) = resume(prev, next, task_thread_info(next)); \ |
72 | 84 | } while (0) |
73 | 85 |
arch/mips/kernel/octeon_switch.S
arch/mips/kernel/r2300_switch.S