]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
MIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.
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)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/system.h
arch/mips/kernel/octeon_switch.S
arch/mips/kernel/r2300_switch.S
arch/mips/kernel/r4k_switch.S

index cd30f83235bb292360233737dd87a4ac343b0830..a2e9239b45aa601d8334dc1054c1e98bec9c4c83 100644 (file)
@@ -63,11 +63,23 @@ 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;                                                     \
+} while (0)
+#endif
+
 #define switch_to(prev, next, last)                                    \
 do {                                                                   \
        __mips_mt_fpaff_switch_to(prev);                                \
        if (cpu_has_dsp)                                                \
                __save_dsp(prev);                                       \
+       __clear_software_ll_bit();                                      \
        (last) = resume(prev, next, task_thread_info(next));            \
 } while (0)
 
index d52389672b06def47bd135992fecccd379f00ab3..3952b8323efac5d3017c86bc99a4b72434fe66d3 100644 (file)
@@ -36,9 +36,6 @@
        .align  7
        LEAF(resume)
        .set arch=octeon
-#ifndef CONFIG_CPU_HAS_LLSC
-       sw      zero, ll_bit
-#endif
        mfc0    t1, CP0_STATUS
        LONG_S  t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0
index 656bde2e11b14d37186b5d3ec850b5397a78167d..698414b7a253d21c0de4017a5198904e6c689fd1 100644 (file)
@@ -46,9 +46,6 @@
  *                     struct thread_info *next_ti) )
  */
 LEAF(resume)
-#ifndef CONFIG_CPU_HAS_LLSC
-       sw      zero, ll_bit
-#endif
        mfc0    t1, CP0_STATUS
        sw      t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0
index d9bfae53c43f92c5a400301bb02bfb3c05bfad92..8893ee1a2368c369ddd503514866597fe6aa4ac3 100644 (file)
@@ -45,9 +45,6 @@
  */
        .align  5
        LEAF(resume)
-#ifndef CONFIG_CPU_HAS_LLSC
-       sw      zero, ll_bit
-#endif
        mfc0    t1, CP0_STATUS
        LONG_S  t1, THREAD_STATUS(a0)
        cpu_save_nonscratch a0