diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-04-13 13:37:26 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-04-20 09:58:37 -0400 |
commit | 5323180db75d562a287cb2020b07c9422df13df6 (patch) | |
tree | 71039fd0a03f89ebb3172d75a9e594d4f9f56fd6 /arch/mips/kernel/r4k_switch.S | |
parent | 9a9943575ade643368849e2c963094ac637867e0 (diff) |
[MIPS] Disallow CpU exception in kernel again.
The commit 4d40bff7110e9e1a97ff8c01bdd6350e9867cc10 ("Allow CpU
exception in kernel partially") was broken. The commit was to fix
theoretical problem but broke usual case. Revert it for now.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/r4k_switch.S')
-rw-r--r-- | arch/mips/kernel/r4k_switch.S | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index c7698fd9955c..cc566cf12246 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -48,7 +48,8 @@ | |||
48 | #ifndef CONFIG_CPU_HAS_LLSC | 48 | #ifndef CONFIG_CPU_HAS_LLSC |
49 | sw zero, ll_bit | 49 | sw zero, ll_bit |
50 | #endif | 50 | #endif |
51 | mfc0 t2, CP0_STATUS | 51 | mfc0 t1, CP0_STATUS |
52 | LONG_S t1, THREAD_STATUS(a0) | ||
52 | cpu_save_nonscratch a0 | 53 | cpu_save_nonscratch a0 |
53 | LONG_S ra, THREAD_REG31(a0) | 54 | LONG_S ra, THREAD_REG31(a0) |
54 | 55 | ||
@@ -58,8 +59,8 @@ | |||
58 | PTR_L t3, TASK_THREAD_INFO(a0) | 59 | PTR_L t3, TASK_THREAD_INFO(a0) |
59 | LONG_L t0, TI_FLAGS(t3) | 60 | LONG_L t0, TI_FLAGS(t3) |
60 | li t1, _TIF_USEDFPU | 61 | li t1, _TIF_USEDFPU |
61 | and t1, t0 | 62 | and t2, t0, t1 |
62 | beqz t1, 1f | 63 | beqz t2, 1f |
63 | nor t1, zero, t1 | 64 | nor t1, zero, t1 |
64 | 65 | ||
65 | and t0, t0, t1 | 66 | and t0, t0, t1 |
@@ -72,13 +73,10 @@ | |||
72 | li t1, ~ST0_CU1 | 73 | li t1, ~ST0_CU1 |
73 | and t0, t0, t1 | 74 | and t0, t0, t1 |
74 | LONG_S t0, ST_OFF(t3) | 75 | LONG_S t0, ST_OFF(t3) |
75 | /* clear thread_struct CU1 bit */ | ||
76 | and t2, t1 | ||
77 | 76 | ||
78 | fpu_save_double a0 t0 t1 # c0_status passed in t0 | 77 | fpu_save_double a0 t0 t1 # c0_status passed in t0 |
79 | # clobbers t1 | 78 | # clobbers t1 |
80 | 1: | 79 | 1: |
81 | LONG_S t2, THREAD_STATUS(a0) | ||
82 | 80 | ||
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 |