summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-18 20:39:49 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-01-18 20:39:49 +0900
commit4291b730cd0f0cf98a90d946b6cabbd804397350 (patch)
treeffee832e1cef4c510275cb4b3a08df9bb5dcb6e1 /arch/sh/kernel/cpu
parent3d467676abf5f01f5ee99056273a58486968e252 (diff)
downloadop-kernel-dev-4291b730cd0f0cf98a90d946b6cabbd804397350.zip
op-kernel-dev-4291b730cd0f0cf98a90d946b6cabbd804397350.tar.gz
sh: Need IRQs enabled for init_fpu().
This tosses in a local_irq_enable()/disable() pair around the init_fpu() callsite in the FPU state restore exception handler. Fixes up a slab BUG triggered by making a slab cache allocation that can sleep whilst irqs_disabled(). This follows the behaviour undertaken by the x86 implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r--arch/sh/kernel/cpu/fpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/fpu.c b/arch/sh/kernel/cpu/fpu.c
index c23e672..f059ed6 100644
--- a/arch/sh/kernel/cpu/fpu.c
+++ b/arch/sh/kernel/cpu/fpu.c
@@ -56,6 +56,7 @@ void fpu_state_restore(struct pt_regs *regs)
}
if (!tsk_used_math(tsk)) {
+ local_irq_enable();
/*
* does a slab alloc which can sleep
*/
@@ -66,6 +67,7 @@ void fpu_state_restore(struct pt_regs *regs)
do_group_exit(SIGKILL);
return;
}
+ local_irq_disable();
}
grab_fpu(regs);
OpenPOWER on IntegriCloud