diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-01-30 23:08:31 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-02-09 00:02:11 +1100 |
commit | 6c6aee009ec34cb7f5ef76f910c1b9417c81efd8 (patch) | |
tree | f05cf0b1d15d4ab1661ef0b00f5a8130df866fce /arch/powerpc/kernel/traps.c | |
parent | 0440b8a22cc48922f7c6ae894abd221cf7cc4b64 (diff) | |
download | linux-6c6aee009ec34cb7f5ef76f910c1b9417c81efd8.tar.bz2 |
powerpc: add and use unknown_async_exception
This is currently the same as unknown_exception, but it will diverge
after interrupt wrappers are added and code moved out of asm into the
wrappers (e.g., async handlers will check FINISH_NAP).
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-22-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 6da3a3642dfb..6691774fe1fb 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1073,6 +1073,18 @@ void unknown_exception(struct pt_regs *regs) exception_exit(prev_state); } +void unknown_async_exception(struct pt_regs *regs) +{ + enum ctx_state prev_state = exception_enter(); + + printk("Bad trap at PC: %lx, SR: %lx, vector=%lx\n", + regs->nip, regs->msr, regs->trap); + + _exception(SIGTRAP, regs, TRAP_UNK, 0); + + exception_exit(prev_state); +} + void instruction_breakpoint_exception(struct pt_regs *regs) { enum ctx_state prev_state = exception_enter(); |