Skip to content

Commit

Permalink
powerpc/64: fix irq replay pt_regs->softe value
Browse files Browse the repository at this point in the history
Replayed interrupts get an "artificial" struct pt_regs constructed to
pass to interrupt handler functions. This did not get the softe field
set correctly, it's as though the interrupt has hit while irqs are
disabled. It should be IRQS_ENABLED.

This is possibly harmless, asynchronous handlers should not be testing
if irqs were disabled, but it might be possible for example some code
is shared with synchronous or NMI handlers, and it makes more sense if
debug output looks at this.

Fixes: 3282a3d ("powerpc/64: Implement soft interrupt replay in C")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200915114650.3980244-2-npiggin@gmail.com
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Oct 6, 2020
1 parent 903fd31 commit 2b48e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void replay_soft_interrupts(void)
struct pt_regs regs;

ppc_save_regs(&regs);
regs.softe = IRQS_ALL_DISABLED;
regs.softe = IRQS_ENABLED;

again:
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
Expand Down

0 comments on commit 2b48e96

Please sign in to comment.