Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Nicholas Piggin and committed by
Michael Ellerman
6c6aee00 0440b8a2

+18 -5
+1
arch/powerpc/include/asm/hw_irq.h
··· 57 57 extern void performance_monitor_exception(struct pt_regs *regs); 58 58 extern void WatchdogException(struct pt_regs *regs); 59 59 extern void unknown_exception(struct pt_regs *regs); 60 + void unknown_async_exception(struct pt_regs *regs); 60 61 61 62 #ifdef CONFIG_PPC64 62 63 #include <asm/paca.h>
+2 -2
arch/powerpc/kernel/exceptions-64s.S
··· 1926 1926 #ifdef CONFIG_PPC_DOORBELL 1927 1927 bl doorbell_exception 1928 1928 #else 1929 - bl unknown_exception 1929 + bl unknown_async_exception 1930 1930 #endif 1931 1931 b interrupt_return 1932 1932 ··· 2312 2312 #ifdef CONFIG_PPC_DOORBELL 2313 2313 bl doorbell_exception 2314 2314 #else 2315 - bl unknown_exception 2315 + bl unknown_async_exception 2316 2316 #endif 2317 2317 b interrupt_return 2318 2318
+3 -3
arch/powerpc/kernel/head_book3s_32.S
··· 238 238 239 239 /* System reset */ 240 240 /* core99 pmac starts the seconary here by changing the vector, and 241 - putting it back to what it was (unknown_exception) when done. */ 242 - EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD) 241 + putting it back to what it was (unknown_async_exception) when done. */ 242 + EXCEPTION(0x100, Reset, unknown_async_exception, EXC_XFER_STD) 243 243 244 244 /* Machine check */ 245 245 /* ··· 641 641 #endif 642 642 643 643 #ifndef CONFIG_TAU_INT 644 - #define TAUException unknown_exception 644 + #define TAUException unknown_async_exception 645 645 #endif 646 646 647 647 EXCEPTION(0x1300, Trap_13, instruction_breakpoint_exception, EXC_XFER_STD)
+12
arch/powerpc/kernel/traps.c
··· 1073 1073 exception_exit(prev_state); 1074 1074 } 1075 1075 1076 + void unknown_async_exception(struct pt_regs *regs) 1077 + { 1078 + enum ctx_state prev_state = exception_enter(); 1079 + 1080 + printk("Bad trap at PC: %lx, SR: %lx, vector=%lx\n", 1081 + regs->nip, regs->msr, regs->trap); 1082 + 1083 + _exception(SIGTRAP, regs, TRAP_UNK, 0); 1084 + 1085 + exception_exit(prev_state); 1086 + } 1087 + 1076 1088 void instruction_breakpoint_exception(struct pt_regs *regs) 1077 1089 { 1078 1090 enum ctx_state prev_state = exception_enter();