diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-04-14 02:37:26 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-04-20 14:58:37 +0100 |
commit | 5323180db75d562a287cb2020b07c9422df13df6 (patch) | |
tree | 71039fd0a03f89ebb3172d75a9e594d4f9f56fd6 /arch/mips/kernel/signal32.c | |
parent | 9a9943575ade643368849e2c963094ac637867e0 (diff) | |
download | kernel_samsung_espresso10-5323180db75d562a287cb2020b07c9422df13df6.zip kernel_samsung_espresso10-5323180db75d562a287cb2020b07c9422df13df6.tar.gz kernel_samsung_espresso10-5323180db75d562a287cb2020b07c9422df13df6.tar.bz2 |
[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/signal32.c')
-rw-r--r-- | arch/mips/kernel/signal32.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 151fd2f..53a337c 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -209,10 +209,10 @@ static int setup_sigcontext32(struct pt_regs *regs, * Save FPU state to signal context. Signal handler * will "inherit" current FPU state. */ + preempt_disable(); own_fpu(1); - enable_fp_in_kernel(); err |= save_fp_context32(sc); - disable_fp_in_kernel(); + preempt_enable(); } return err; } @@ -225,7 +225,10 @@ check_and_restore_fp_context32(struct sigcontext32 __user *sc) err = sig = fpcsr_pending(&sc->sc_fpc_csr); if (err > 0) err = 0; + preempt_disable(); + own_fpu(0); err |= restore_fp_context32(sc); + preempt_enable(); return err ?: sig; } @@ -261,11 +264,8 @@ static int restore_sigcontext32(struct pt_regs *regs, if (used_math) { /* restore fpu context if we have used it before */ - own_fpu(0); - enable_fp_in_kernel(); if (!err) err = check_and_restore_fp_context32(sc); - disable_fp_in_kernel(); } else { /* signal handler may have used FPU. Give it up. */ lose_fpu(0); |