Lines Matching refs:regs
74 int (*__debugger)(struct pt_regs *regs) __read_mostly;
75 int (*__debugger_ipi)(struct pt_regs *regs) __read_mostly;
76 int (*__debugger_bpt)(struct pt_regs *regs) __read_mostly;
77 int (*__debugger_sstep)(struct pt_regs *regs) __read_mostly;
78 int (*__debugger_iabr_match)(struct pt_regs *regs) __read_mostly;
79 int (*__debugger_break_match)(struct pt_regs *regs) __read_mostly;
80 int (*__debugger_fault_handler)(struct pt_regs *regs) __read_mostly;
181 static unsigned long oops_begin(struct pt_regs *regs) in oops_begin() argument
207 static void oops_end(unsigned long flags, struct pt_regs *regs, in oops_end() argument
225 if (TRAP(regs) == INTERRUPT_SYSTEM_RESET) in oops_end()
228 crash_fadump(regs, "die oops"); in oops_end()
231 crash_kexec(regs); in oops_end()
262 static int __die(const char *str, struct pt_regs *regs, long err) in __die() argument
275 if (notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV) == NOTIFY_STOP) in __die()
279 show_regs(regs); in __die()
285 void die(const char *str, struct pt_regs *regs, long err) in die() argument
292 if (TRAP(regs) != INTERRUPT_SYSTEM_RESET) { in die()
293 if (debugger(regs)) in die()
297 flags = oops_begin(regs); in die()
298 if (__die(str, regs, err)) in die()
300 oops_end(flags, regs, err); in die()
304 void user_single_step_report(struct pt_regs *regs) in user_single_step_report() argument
306 force_sig_fault(SIGTRAP, TRAP_TRACE, (void __user *)regs->nip); in user_single_step_report()
309 static void show_signal_msg(int signr, struct pt_regs *regs, int code, in show_signal_msg() argument
326 addr, regs->nip, regs->link, code); in show_signal_msg()
328 print_vma_addr(KERN_CONT " in ", regs->nip); in show_signal_msg()
332 show_user_instructions(regs); in show_signal_msg()
335 static bool exception_common(int signr, struct pt_regs *regs, int code, in exception_common() argument
338 if (!user_mode(regs)) { in exception_common()
339 die("Exception in kernel mode", regs, signr); in exception_common()
352 show_signal_msg(signr, regs, code, addr); in exception_common()
359 void _exception_pkey(struct pt_regs *regs, unsigned long addr, int key) in _exception_pkey() argument
361 if (!exception_common(SIGSEGV, regs, SEGV_PKUERR, addr)) in _exception_pkey()
367 void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) in _exception() argument
369 if (!exception_common(signr, regs, code, addr)) in _exception()
396 noinstr void hv_nmi_check_nonrecoverable(struct pt_regs *regs) in hv_nmi_check_nonrecoverable() argument
400 unsigned long nip = regs->nip; in hv_nmi_check_nonrecoverable()
402 if (!(regs->msr & MSR_RI)) in hv_nmi_check_nonrecoverable()
404 if (!(regs->msr & MSR_HV)) in hv_nmi_check_nonrecoverable()
406 if (user_mode(regs)) in hv_nmi_check_nonrecoverable()
436 regs->msr &= ~MSR_RI; in hv_nmi_check_nonrecoverable()
461 hv_nmi_check_nonrecoverable(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
467 if (ppc_md.system_reset_exception(regs)) in DEFINE_INTERRUPT_HANDLER_NMI()
471 if (debugger(regs)) in DEFINE_INTERRUPT_HANDLER_NMI()
480 crash_fadump(regs, "System Reset"); in DEFINE_INTERRUPT_HANDLER_NMI()
482 crash_kexec(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
489 crash_kexec_secondary(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
495 die("System Reset", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER_NMI()
499 nmi_panic(regs, "System Reset"); in DEFINE_INTERRUPT_HANDLER_NMI()
505 die("Unrecoverable nested System Reset", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER_NMI()
508 if (regs_is_unrecoverable(regs)) { in DEFINE_INTERRUPT_HANDLER_NMI()
511 die("Unrecoverable System Reset", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER_NMI()
531 static inline int check_io_access(struct pt_regs *regs) in check_io_access() argument
534 unsigned long msr = regs->msr; in check_io_access()
536 unsigned int *nip = (unsigned int *)regs->nip; in check_io_access()
539 && (entry = search_exception_tables(regs->nip)) != NULL) { in check_io_access()
559 regs->gpr[rb] - _IO_BASE, nip); in check_io_access()
560 regs_set_recoverable(regs); in check_io_access()
561 regs_set_return_ip(regs, extable_fixup(entry)); in check_io_access()
572 #define get_reason(regs) ((regs)->esr) argument
581 #define single_stepping(regs) (current->thread.debug.dbcr0 & DBCR0_IC) argument
582 #define clear_single_step(regs) (current->thread.debug.dbcr0 &= ~DBCR0_IC) argument
583 #define clear_br_trace(regs) do {} while(0) argument
587 #define get_reason(regs) ((regs)->msr) argument
596 #define single_stepping(regs) ((regs)->msr & MSR_SE) argument
597 #define clear_single_step(regs) (regs_set_return_msr((regs), (regs)->msr & ~MSR_SE)) argument
598 #define clear_br_trace(regs) (regs_set_return_msr((regs), (regs)->msr & ~MSR_BE)) argument
604 int machine_check_e500mc(struct pt_regs *regs) in machine_check_e500mc() argument
612 recoverable = fsl_rio_mcheck_exception(regs); in machine_check_e500mc()
711 int machine_check_e500(struct pt_regs *regs) in machine_check_e500() argument
716 if (fsl_rio_mcheck_exception(regs)) in machine_check_e500()
718 if (fsl_pci_mcheck_exception(regs)) in machine_check_e500()
753 int machine_check_generic(struct pt_regs *regs) in machine_check_generic() argument
758 int machine_check_generic(struct pt_regs *regs) in machine_check_generic() argument
760 unsigned long reason = regs->msr; in machine_check_generic()
794 void die_mce(const char *str, struct pt_regs *regs, long err) in die_mce() argument
805 die(str, regs, err); in die_mce()
816 static void __machine_check_exception(struct pt_regs *regs) in __machine_check_exception() argument
831 recover = ppc_md.machine_check_exception(regs); in __machine_check_exception()
833 recover = cur_cpu_spec->machine_check(regs); in __machine_check_exception()
838 if (debugger_fault_handler(regs)) in __machine_check_exception()
841 if (check_io_access(regs)) in __machine_check_exception()
844 die_mce("Machine check", regs, SIGBUS); in __machine_check_exception()
848 if (regs_is_unrecoverable(regs)) in __machine_check_exception()
849 die_mce("Unrecoverable Machine check", regs, SIGBUS); in __machine_check_exception()
856 udbg_printf("SRR0=0x%016lx SRR1=0x%016lx\n", regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER_RAW()
857 udbg_printf(" DAR=0x%016lx DSISR=0x%08lx\n", regs->dar, regs->dsisr); in DEFINE_INTERRUPT_HANDLER_RAW()
858 udbg_printf(" LR=0x%016lx R1=0x%08lx\n", regs->link, regs->gpr[1]); in DEFINE_INTERRUPT_HANDLER_RAW()
860 die("Machine check (early boot)", regs, SIGBUS); in DEFINE_INTERRUPT_HANDLER_RAW()
868 __machine_check_exception(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
873 __machine_check_exception(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
880 die("System Management Interrupt", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
884 static void p9_hmi_special_emu(struct pt_regs *regs) in p9_hmi_special_emu() argument
892 if (__get_user(instr, (unsigned int __user *)regs->nip)) in p9_hmi_special_emu()
905 regs->nip, instr); in p9_hmi_special_emu()
910 msr = regs->msr; /* Grab msr before we flush the bits */ in p9_hmi_special_emu()
930 ea = regs->gpr[rb] + (ra ? regs->gpr[ra] : 0); in p9_hmi_special_emu()
940 regs->nip, instr, (unsigned long)addr); in p9_hmi_special_emu()
955 regs->nip, instr, (unsigned long)addr); in p9_hmi_special_emu()
961 smp_processor_id(), current->comm, current->pid, regs->nip, in p9_hmi_special_emu()
981 regs->nip, instr, msr); in p9_hmi_special_emu()
988 PPC_WARN_EMULATED(lxvw4x, regs); in p9_hmi_special_emu()
991 PPC_WARN_EMULATED(lxvh8x, regs); in p9_hmi_special_emu()
994 PPC_WARN_EMULATED(lxvd2x, regs); in p9_hmi_special_emu()
997 PPC_WARN_EMULATED(lxvb16x, regs); in p9_hmi_special_emu()
1060 regs_add_return_ip(regs, 4); in p9_hmi_special_emu()
1068 old_regs = set_irq_regs(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1080 p9_hmi_special_emu(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1086 ppc_md.handle_hmi_exception(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1094 regs->nip, regs->msr, regs->trap); in DEFINE_INTERRUPT_HANDLER()
1096 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER()
1102 regs->nip, regs->msr, regs->trap); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1104 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1110 regs->nip, regs->msr, regs->trap); in DEFINE_INTERRUPT_HANDLER_NMI()
1112 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER_NMI()
1119 if (notify_die(DIE_IABR_MATCH, "iabr_match", regs, 5, in DEFINE_INTERRUPT_HANDLER()
1122 if (debugger_iabr_match(regs)) in DEFINE_INTERRUPT_HANDLER()
1124 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1129 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER()
1132 static void __single_step_exception(struct pt_regs *regs) in __single_step_exception() argument
1134 clear_single_step(regs); in __single_step_exception()
1135 clear_br_trace(regs); in __single_step_exception()
1137 if (kprobe_post_handler(regs)) in __single_step_exception()
1140 if (notify_die(DIE_SSTEP, "single_step", regs, 5, in __single_step_exception()
1143 if (debugger_sstep(regs)) in __single_step_exception()
1146 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); in __single_step_exception()
1151 __single_step_exception(regs); in DEFINE_INTERRUPT_HANDLER()
1160 void emulate_single_step(struct pt_regs *regs) in emulate_single_step() argument
1162 if (single_stepping(regs)) in emulate_single_step()
1163 __single_step_exception(regs); in emulate_single_step()
1195 static void parse_fpe(struct pt_regs *regs) in parse_fpe() argument
1205 _exception(SIGFPE, regs, code, regs->nip); in parse_fpe()
1219 static int emulate_string_inst(struct pt_regs *regs, u32 instword) in emulate_string_inst() argument
1233 EA = (rA == 0) ? 0 : regs->gpr[rA]; in emulate_string_inst()
1239 num_bytes = regs->xer & 0x7f; in emulate_string_inst()
1255 if ((regs->msr & MSR_64BIT) == 0) in emulate_string_inst()
1266 regs->gpr[rT] = 0; in emulate_string_inst()
1267 regs->gpr[rT] |= val << shift; in emulate_string_inst()
1271 val = regs->gpr[rT] >> shift; in emulate_string_inst()
1291 static int emulate_popcntb_inst(struct pt_regs *regs, u32 instword) in emulate_popcntb_inst() argument
1299 tmp = regs->gpr[rs]; in emulate_popcntb_inst()
1303 regs->gpr[ra] = tmp; in emulate_popcntb_inst()
1308 static int emulate_isel(struct pt_regs *regs, u32 instword) in emulate_isel() argument
1317 tmp = (rA == 0) ? 0 : regs->gpr[rA]; in emulate_isel()
1318 bit = (regs->ccr >> (31 - BC)) & 0x1; in emulate_isel()
1320 regs->gpr[rT] = bit ? tmp : regs->gpr[rB]; in emulate_isel()
1326 static inline bool tm_abort_check(struct pt_regs *regs, int cause) in tm_abort_check() argument
1333 if (MSR_TM_TRANSACTIONAL(regs->msr)) { in tm_abort_check()
1341 static inline bool tm_abort_check(struct pt_regs *regs, int reason) in tm_abort_check() argument
1347 static int emulate_instruction(struct pt_regs *regs) in emulate_instruction() argument
1352 if (!user_mode(regs)) in emulate_instruction()
1355 if (get_user(instword, (u32 __user *)(regs->nip))) in emulate_instruction()
1360 PPC_WARN_EMULATED(mfpvr, regs); in emulate_instruction()
1362 regs->gpr[rd] = mfspr(SPRN_PVR); in emulate_instruction()
1368 PPC_WARN_EMULATED(dcba, regs); in emulate_instruction()
1377 PPC_WARN_EMULATED(mcrxr, regs); in emulate_instruction()
1378 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk); in emulate_instruction()
1379 regs->xer &= ~0xf0000000UL; in emulate_instruction()
1385 if (tm_abort_check(regs, in emulate_instruction()
1388 PPC_WARN_EMULATED(string, regs); in emulate_instruction()
1389 return emulate_string_inst(regs, instword); in emulate_instruction()
1394 PPC_WARN_EMULATED(popcntb, regs); in emulate_instruction()
1395 return emulate_popcntb_inst(regs, instword); in emulate_instruction()
1400 PPC_WARN_EMULATED(isel, regs); in emulate_instruction()
1401 return emulate_isel(regs, instword); in emulate_instruction()
1406 PPC_WARN_EMULATED(sync, regs); in emulate_instruction()
1418 PPC_WARN_EMULATED(mfdscr, regs); in emulate_instruction()
1420 regs->gpr[rd] = mfspr(SPRN_DSCR); in emulate_instruction()
1429 PPC_WARN_EMULATED(mtdscr, regs); in emulate_instruction()
1431 current->thread.dscr = regs->gpr[rd]; in emulate_instruction()
1449 static int emulate_math(struct pt_regs *regs) in emulate_math() argument
1453 ret = do_mathemu(regs); in emulate_math()
1455 PPC_WARN_EMULATED(math, regs); in emulate_math()
1459 emulate_single_step(regs); in emulate_math()
1464 _exception(SIGFPE, regs, code, regs->nip); in emulate_math()
1468 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); in emulate_math()
1475 static inline int emulate_math(struct pt_regs *regs) { return -1; } in emulate_math() argument
1478 static void do_program_check(struct pt_regs *regs) in do_program_check() argument
1480 unsigned int reason = get_reason(regs); in do_program_check()
1487 parse_fpe(regs); in do_program_check()
1494 if (debugger_bpt(regs)) in do_program_check()
1497 if (kprobe_handler(regs)) in do_program_check()
1501 if (notify_die(DIE_BPT, "breakpoint", regs, 5, 5, SIGTRAP) in do_program_check()
1505 bugaddr = regs->nip; in do_program_check()
1509 if (!is_kernel_addr(bugaddr) && !(regs->msr & MSR_IR)) in do_program_check()
1512 if (!user_mode(regs) && in do_program_check()
1513 report_bug(bugaddr, regs) == BUG_TRAP_TYPE_WARN) { in do_program_check()
1514 regs_add_return_ip(regs, 4); in do_program_check()
1519 if (!user_mode(regs)) { in do_program_check()
1520 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); in do_program_check()
1541 if (user_mode(regs)) { in do_program_check()
1542 _exception(SIGILL, regs, ILL_ILLOPN, regs->nip); in do_program_check()
1547 regs->nip, regs->msr, get_paca()->tm_scratch); in do_program_check()
1548 die("Unrecoverable exception", regs, SIGABRT); in do_program_check()
1561 if (!user_mode(regs)) in do_program_check()
1564 interrupt_cond_local_irq_enable(regs); in do_program_check()
1577 if (get_user_instr(insn, (void __user *)regs->nip)) { in do_program_check()
1578 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); in do_program_check()
1584 _exception(SIGILL, regs, ILL_ILLOPN, regs->nip); in do_program_check()
1589 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); in do_program_check()
1601 if (!emulate_math(regs)) in do_program_check()
1606 switch (emulate_instruction(regs)) { in do_program_check()
1608 regs_add_return_ip(regs, 4); in do_program_check()
1609 emulate_single_step(regs); in do_program_check()
1612 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); in do_program_check()
1619 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); in do_program_check()
1621 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in do_program_check()
1627 do_program_check(regs); in DEFINE_INTERRUPT_HANDLER()
1636 regs_set_return_msr(regs, regs->msr | REASON_ILLEGAL); in DEFINE_INTERRUPT_HANDLER()
1637 do_program_check(regs); in DEFINE_INTERRUPT_HANDLER()
1645 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
1647 reason = get_reason(regs); in DEFINE_INTERRUPT_HANDLER()
1654 if (tm_abort_check(regs, TM_CAUSE_ALIGNMENT | TM_CAUSE_PERSISTENT)) in DEFINE_INTERRUPT_HANDLER()
1659 fixed = fix_alignment(regs); in DEFINE_INTERRUPT_HANDLER()
1663 regs_add_return_ip(regs, inst_length(reason)); in DEFINE_INTERRUPT_HANDLER()
1664 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
1677 if (user_mode(regs)) in DEFINE_INTERRUPT_HANDLER()
1678 _exception(sig, regs, code, regs->dar); in DEFINE_INTERRUPT_HANDLER()
1680 bad_page_fault(regs, sig); in DEFINE_INTERRUPT_HANDLER()
1685 die("Kernel stack overflow", regs, SIGSEGV); in DEFINE_INTERRUPT_HANDLER()
1691 "%lx at %lx\n", regs->trap, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1692 die("Unrecoverable FP Unavailable Exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1697 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
1700 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1705 "%lx at %lx\n", regs->trap, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1706 die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1711 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
1714 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1719 "%lx at %lx\n", regs->trap, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1720 die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1724 static void tm_unavailable(struct pt_regs *regs) in tm_unavailable() argument
1727 if (user_mode(regs)) { in tm_unavailable()
1729 regs_set_return_msr(regs, regs->msr | MSR_TM); in tm_unavailable()
1736 "%lx at %lx\n", regs->trap, regs->nip); in tm_unavailable()
1737 die("Unrecoverable TM Unavailable Exception", regs, SIGABRT); in tm_unavailable()
1761 hv = (TRAP(regs) == INTERRUPT_H_FAC_UNAVAIL); in DEFINE_INTERRUPT_HANDLER()
1774 if (!user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
1776 facility, status, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1777 die("Unexpected facility unavailable exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1780 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
1799 if (get_user(instword, (u32 __user *)(regs->nip))) { in DEFINE_INTERRUPT_HANDLER()
1808 current->thread.dscr = regs->gpr[rd]; in DEFINE_INTERRUPT_HANDLER()
1817 if (emulate_instruction(regs)) { in DEFINE_INTERRUPT_HANDLER()
1821 regs_add_return_ip(regs, 4); in DEFINE_INTERRUPT_HANDLER()
1822 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
1844 tm_unavailable(regs); in DEFINE_INTERRUPT_HANDLER()
1849 hv ? "Hypervisor " : "", facility, status, regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1852 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1863 regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1899 regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1917 regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1937 perf_irq(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
1948 perf_irq(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1959 if (IS_ENABLED(CONFIG_PPC64) && unlikely(arch_irq_disabled_regs(regs))) in DEFINE_INTERRUPT_HANDLER_RAW()
1960 performance_monitor_exception_nmi(regs); in DEFINE_INTERRUPT_HANDLER_RAW()
1962 performance_monitor_exception_async(regs); in DEFINE_INTERRUPT_HANDLER_RAW()
1968 static void handle_debug(struct pt_regs *regs, unsigned long debug_status) in handle_debug() argument
1980 do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, in handle_debug()
1985 do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, in handle_debug()
1991 do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, in handle_debug()
1996 do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, in handle_debug()
2002 do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, in handle_debug()
2007 do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, in handle_debug()
2018 regs_set_return_msr(regs, regs->msr | MSR_DE); in handle_debug()
2029 unsigned long debug_status = regs->dsisr; in DEFINE_INTERRUPT_HANDLER()
2039 regs_set_return_msr(regs, regs->msr & ~MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2047 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
2050 regs_set_return_msr(regs, regs->msr | MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2054 if (kprobe_post_handler(regs)) in DEFINE_INTERRUPT_HANDLER()
2057 if (notify_die(DIE_SSTEP, "block_step", regs, 5, in DEFINE_INTERRUPT_HANDLER()
2061 if (debugger_sstep(regs)) in DEFINE_INTERRUPT_HANDLER()
2064 regs_set_return_msr(regs, regs->msr & ~MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2071 if (kprobe_post_handler(regs)) in DEFINE_INTERRUPT_HANDLER()
2074 if (notify_die(DIE_SSTEP, "single_step", regs, 5, in DEFINE_INTERRUPT_HANDLER()
2079 if (debugger_sstep(regs)) in DEFINE_INTERRUPT_HANDLER()
2082 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
2086 regs_set_return_msr(regs, regs->msr | MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2092 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2094 handle_debug(regs, debug_status); in DEFINE_INTERRUPT_HANDLER()
2103 if (!user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
2105 " at %lx\n", regs->nip); in DEFINE_INTERRUPT_HANDLER()
2106 die("Kernel VMX/Altivec assist exception", regs, SIGILL); in DEFINE_INTERRUPT_HANDLER()
2111 PPC_WARN_EMULATED(altivec, regs); in DEFINE_INTERRUPT_HANDLER()
2112 err = emulate_altivec(regs); in DEFINE_INTERRUPT_HANDLER()
2114 regs_add_return_ip(regs, 4); /* skip emulated instruction */ in DEFINE_INTERRUPT_HANDLER()
2115 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
2121 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2126 "in %s at %lx\n", current->comm, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2135 unsigned long error_code = regs->dsisr; in DEFINE_INTERRUPT_HANDLER()
2142 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2155 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
2176 err = do_spe_mathemu(regs); in DEFINE_INTERRUPT_HANDLER()
2178 regs_add_return_ip(regs, 4); /* skip emulated instruction */ in DEFINE_INTERRUPT_HANDLER()
2179 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
2185 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2189 "in %s at %lx\n", current->comm, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2191 _exception(SIGFPE, regs, code, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2201 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
2204 if (regs->msr & MSR_SPE) in DEFINE_INTERRUPT_HANDLER()
2208 regs_add_return_ip(regs, -4); in DEFINE_INTERRUPT_HANDLER()
2209 err = speround_handler(regs); in DEFINE_INTERRUPT_HANDLER()
2211 regs_add_return_ip(regs, 4); /* skip emulated instruction */ in DEFINE_INTERRUPT_HANDLER()
2212 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
2218 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2222 "in %s at %lx\n", current->comm, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2224 _exception(SIGFPE, regs, FPE_FLTUNK, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2236 void __noreturn unrecoverable_exception(struct pt_regs *regs) in unrecoverable_exception() argument
2239 regs->trap, regs->nip, regs->msr); in unrecoverable_exception()
2240 die("Unrecoverable exception", regs, SIGABRT); in unrecoverable_exception()
2262 regs->gpr[1], regs->nip); in DEFINE_INTERRUPT_HANDLER()
2263 die("Bad kernel stack pointer", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()