diff options
Diffstat (limited to 'arch/mips/kernel/r2300_switch.S')
-rw-r--r-- | arch/mips/kernel/r2300_switch.S | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 28c2e2e6af73..656bde2e11b1 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -49,7 +49,8 @@ LEAF(resume) | |||
49 | #ifndef CONFIG_CPU_HAS_LLSC | 49 | #ifndef CONFIG_CPU_HAS_LLSC |
50 | sw zero, ll_bit | 50 | sw zero, ll_bit |
51 | #endif | 51 | #endif |
52 | mfc0 t2, CP0_STATUS | 52 | mfc0 t1, CP0_STATUS |
53 | sw t1, THREAD_STATUS(a0) | ||
53 | cpu_save_nonscratch a0 | 54 | cpu_save_nonscratch a0 |
54 | sw ra, THREAD_REG31(a0) | 55 | sw ra, THREAD_REG31(a0) |
55 | 56 | ||
@@ -59,8 +60,8 @@ LEAF(resume) | |||
59 | lw t3, TASK_THREAD_INFO(a0) | 60 | lw t3, TASK_THREAD_INFO(a0) |
60 | lw t0, TI_FLAGS(t3) | 61 | lw t0, TI_FLAGS(t3) |
61 | li t1, _TIF_USEDFPU | 62 | li t1, _TIF_USEDFPU |
62 | and t1, t0 | 63 | and t2, t0, t1 |
63 | beqz t1, 1f | 64 | beqz t2, 1f |
64 | nor t1, zero, t1 | 65 | nor t1, zero, t1 |
65 | 66 | ||
66 | and t0, t0, t1 | 67 | and t0, t0, t1 |
@@ -73,13 +74,10 @@ LEAF(resume) | |||
73 | li t1, ~ST0_CU1 | 74 | li t1, ~ST0_CU1 |
74 | and t0, t0, t1 | 75 | and t0, t0, t1 |
75 | sw t0, ST_OFF(t3) | 76 | sw t0, ST_OFF(t3) |
76 | /* clear thread_struct CU1 bit */ | ||
77 | and t2, t1 | ||
78 | 77 | ||
79 | fpu_save_single a0, t0 # clobbers t0 | 78 | fpu_save_single a0, t0 # clobbers t0 |
80 | 79 | ||
81 | 1: | 80 | 1: |
82 | sw t2, THREAD_STATUS(a0) | ||
83 | /* | 81 | /* |
84 | * The order of restoring the registers takes care of the race | 82 | * The order of restoring the registers takes care of the race |
85 | * updating $28, $29 and kernelsp without disabling ints. | 83 | * updating $28, $29 and kernelsp without disabling ints. |