Skip to content

Commit 0b73688

Browse files
chleroympe
authored andcommitted
powerpc/traps: unrecoverable_exception() is not an interrupt handler
unrecoverable_exception() is called from interrupt handlers or after an interrupt handler has failed. Make it a standard function to avoid doubling the actions performed on interrupt entry (e.g.: user time accounting). Fixes: 3a96570 ("powerpc: convert interrupt handlers to use wrappers") Signed-off-by: Christophe Leroy <[email protected]> Reviewed-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/ae96c59fa2cb7f24a8929c58cfa2c909cb8ff1f1.1615291471.git.christophe.leroy@csgroup.eu
1 parent bd73758 commit 0b73688

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/powerpc/include/asm/interrupt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ DECLARE_INTERRUPT_HANDLER(altivec_assist_exception);
410410
DECLARE_INTERRUPT_HANDLER(CacheLockingException);
411411
DECLARE_INTERRUPT_HANDLER(SPEFloatingPointException);
412412
DECLARE_INTERRUPT_HANDLER(SPEFloatingPointRoundException);
413-
DECLARE_INTERRUPT_HANDLER(unrecoverable_exception);
414413
DECLARE_INTERRUPT_HANDLER(WatchdogException);
415414
DECLARE_INTERRUPT_HANDLER(kernel_bad_stack);
416415

@@ -437,6 +436,8 @@ DECLARE_INTERRUPT_HANDLER_NMI(hmi_exception_realmode);
437436

438437
DECLARE_INTERRUPT_HANDLER_ASYNC(TAUException);
439438

439+
void unrecoverable_exception(struct pt_regs *regs);
440+
440441
void replay_system_reset(void);
441442
void replay_soft_interrupts(void);
442443

arch/powerpc/kernel/interrupt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs, unsigned
436436
return ret;
437437
}
438438

439-
void unrecoverable_exception(struct pt_regs *regs);
440439
void preempt_schedule_irq(void);
441440

442441
notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs, unsigned long msr)

arch/powerpc/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ DEFINE_INTERRUPT_HANDLER(SPEFloatingPointRoundException)
21702170
* in the MSR is 0. This indicates that SRR0/1 are live, and that
21712171
* we therefore lost state by taking this exception.
21722172
*/
2173-
DEFINE_INTERRUPT_HANDLER(unrecoverable_exception)
2173+
void unrecoverable_exception(struct pt_regs *regs)
21742174
{
21752175
pr_emerg("Unrecoverable exception %lx at %lx (msr=%lx)\n",
21762176
regs->trap, regs->nip, regs->msr);

0 commit comments

Comments
 (0)