Skip to content

Commit

Permalink
powerpc/fsl_booke: ensure SPEFloatingPointException() reenables inter…
Browse files Browse the repository at this point in the history
…rupts

SPEFloatingPointException() is the only exception handler which 'forgets' to
re-enable interrupts. This patch makes sure it does.

Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed May 2, 2019
1 parent 90f204b commit ef42912
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,10 @@ void SPEFloatingPointException(struct pt_regs *regs)
int code = FPE_FLTUNK;
int err;

/* We restore the interrupt state now */
if (!arch_irq_disabled_regs(regs))
local_irq_enable();

flush_spe_to_thread(current);

spefscr = current->thread.spefscr;
Expand Down Expand Up @@ -2133,6 +2137,10 @@ void SPEFloatingPointRoundException(struct pt_regs *regs)
extern int speround_handler(struct pt_regs *regs);
int err;

/* We restore the interrupt state now */
if (!arch_irq_disabled_regs(regs))
local_irq_enable();

preempt_disable();
if (regs->msr & MSR_SPE)
giveup_spe(current);
Expand Down

0 comments on commit ef42912

Please sign in to comment.