aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2009-09-16 20:25:05 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-09-17 14:07:49 -0400
commitf4c6b6bc5a4fc8d607f2d89369008c85a3a12a8b (patch)
treebfcde115df6f7712b3c3356d608ae3a29c01a7c9 /arch/mips/include
parent6eb10bc9e2deab06630261cd05c4cb1e9a60e980 (diff)
MIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
index cd30f83235bb..a2e9239b45aa 100644
--- a/arch/mips/include/asm/system.h
+++ b/arch/mips/include/asm/system.h
@@ -63,11 +63,23 @@ do { \
63#define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0) 63#define __mips_mt_fpaff_switch_to(prev) do { (void) (prev); } while (0)
64#endif 64#endif
65 65
66#ifdef CONFIG_CPU_HAS_LLSC
67#define __clear_software_ll_bit() do { } while (0)
68#else
69extern unsigned long ll_bit;
70
71#define __clear_software_ll_bit() \
72do { \
73 ll_bit = 0; \
74} while (0)
75#endif
76
66#define switch_to(prev, next, last) \ 77#define switch_to(prev, next, last) \
67do { \ 78do { \
68 __mips_mt_fpaff_switch_to(prev); \ 79 __mips_mt_fpaff_switch_to(prev); \
69 if (cpu_has_dsp) \ 80 if (cpu_has_dsp) \
70 __save_dsp(prev); \ 81 __save_dsp(prev); \
82 __clear_software_ll_bit(); \
71 (last) = resume(prev, next, task_thread_info(next)); \ 83 (last) = resume(prev, next, task_thread_info(next)); \
72} while (0) 84} while (0)
73 85