diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-01 15:47:44 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-09 10:55:10 +1100 |
commit | 9f2f79e3a3c19ae745d0439d6e0eed31df28de3c (patch) | |
tree | 0f68f198e3ce6233c5c96d0267de9a73832858a4 /arch/powerpc/kernel/traps.c | |
parent | a546498f3bf9aac311c66f965186373aee2ca0b0 (diff) | |
download | blackbird-op-linux-9f2f79e3a3c19ae745d0439d6e0eed31df28de3c.tar.gz blackbird-op-linux-9f2f79e3a3c19ae745d0439d6e0eed31df28de3c.zip |
powerpc: Disable interrupts in 64-bit kernel FP and vector faults
If we get a floating point, altivec or vsx unavaible interrupt in
kernel, we trigger a kernel error. There is no point preserving
the interrupt state, in fact, that can even make debugging harder
as the processor state might change (we may even preempt) between
taking the exception and landing in a debugger.
So just make those 3 disable interrupts unconditionally.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
v2: On BookE only disable when hitting the kernel unavailable
path, otherwise it will fail to restore softe as
fast_exception_return doesn't do it.
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 5d40e592ffcb..a750409ccc4e 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -247,6 +247,9 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) addr, regs->nip, regs->link, code); } + if (!arch_irq_disabled_regs(regs)) + local_irq_enable(); + memset(&info, 0, sizeof(info)); info.si_signo = signr; info.si_code = code; |