Lines Matching refs:regs
73 int (*__debugger)(struct pt_regs *regs) __read_mostly;
74 int (*__debugger_ipi)(struct pt_regs *regs) __read_mostly;
75 int (*__debugger_bpt)(struct pt_regs *regs) __read_mostly;
76 int (*__debugger_sstep)(struct pt_regs *regs) __read_mostly;
77 int (*__debugger_iabr_match)(struct pt_regs *regs) __read_mostly;
78 int (*__debugger_break_match)(struct pt_regs *regs) __read_mostly;
79 int (*__debugger_fault_handler)(struct pt_regs *regs) __read_mostly;
180 static unsigned long oops_begin(struct pt_regs *regs) in oops_begin() argument
206 static void oops_end(unsigned long flags, struct pt_regs *regs, in oops_end() argument
224 if (TRAP(regs) == INTERRUPT_SYSTEM_RESET) in oops_end()
227 crash_fadump(regs, "die oops"); in oops_end()
230 crash_kexec(regs); in oops_end()
261 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 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 (regs->msr & MSR_PR) in hv_nmi_check_nonrecoverable()
436 regs_set_unrecoverable(regs); in hv_nmi_check_nonrecoverable()
459 hv_nmi_check_nonrecoverable(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
465 if (ppc_md.system_reset_exception(regs)) in DEFINE_INTERRUPT_HANDLER_NMI()
469 if (debugger(regs)) in DEFINE_INTERRUPT_HANDLER_NMI()
478 crash_fadump(regs, "System Reset"); in DEFINE_INTERRUPT_HANDLER_NMI()
480 crash_kexec(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
487 crash_kexec_secondary(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
493 die("System Reset", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER_NMI()
497 nmi_panic(regs, "System Reset"); in DEFINE_INTERRUPT_HANDLER_NMI()
503 die("Unrecoverable nested System Reset", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER_NMI()
506 if (regs_is_unrecoverable(regs)) { in DEFINE_INTERRUPT_HANDLER_NMI()
509 die("Unrecoverable System Reset", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER_NMI()
529 static inline int check_io_access(struct pt_regs *regs) in check_io_access() argument
532 unsigned long msr = regs->msr; in check_io_access()
534 unsigned int *nip = (unsigned int *)regs->nip; in check_io_access()
537 && (entry = search_exception_tables(regs->nip)) != NULL) { in check_io_access()
557 regs->gpr[rb] - _IO_BASE, nip); in check_io_access()
558 regs_set_recoverable(regs); in check_io_access()
559 regs_set_return_ip(regs, extable_fixup(entry)); in check_io_access()
570 #define get_reason(regs) ((regs)->esr) argument
579 #define single_stepping(regs) (current->thread.debug.dbcr0 & DBCR0_IC) argument
580 #define clear_single_step(regs) (current->thread.debug.dbcr0 &= ~DBCR0_IC) argument
581 #define clear_br_trace(regs) do {} while(0) argument
585 #define get_reason(regs) ((regs)->msr) argument
594 #define single_stepping(regs) ((regs)->msr & MSR_SE) argument
595 #define clear_single_step(regs) (regs_set_return_msr((regs), (regs)->msr & ~MSR_SE)) argument
596 #define clear_br_trace(regs) (regs_set_return_msr((regs), (regs)->msr & ~MSR_BE)) argument
602 int machine_check_e500mc(struct pt_regs *regs) in machine_check_e500mc() argument
610 recoverable = fsl_rio_mcheck_exception(regs); in machine_check_e500mc()
709 int machine_check_e500(struct pt_regs *regs) in machine_check_e500() argument
714 if (fsl_rio_mcheck_exception(regs)) in machine_check_e500()
716 if (fsl_pci_mcheck_exception(regs)) in machine_check_e500()
751 int machine_check_generic(struct pt_regs *regs) in machine_check_generic() argument
756 int machine_check_generic(struct pt_regs *regs) in machine_check_generic() argument
758 unsigned long reason = regs->msr; in machine_check_generic()
792 void die_mce(const char *str, struct pt_regs *regs, long err) in die_mce() argument
803 die(str, regs, err); in die_mce()
814 static void __machine_check_exception(struct pt_regs *regs) in __machine_check_exception() argument
829 recover = ppc_md.machine_check_exception(regs); in __machine_check_exception()
831 recover = cur_cpu_spec->machine_check(regs); in __machine_check_exception()
836 if (debugger_fault_handler(regs)) in __machine_check_exception()
839 if (check_io_access(regs)) in __machine_check_exception()
842 die_mce("Machine check", regs, SIGBUS); in __machine_check_exception()
846 if (regs_is_unrecoverable(regs)) in __machine_check_exception()
847 die_mce("Unrecoverable Machine check", regs, SIGBUS); in __machine_check_exception()
853 __machine_check_exception(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
858 __machine_check_exception(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
865 die("System Management Interrupt", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
869 static void p9_hmi_special_emu(struct pt_regs *regs) in p9_hmi_special_emu() argument
877 if (__get_user(instr, (unsigned int __user *)regs->nip)) in p9_hmi_special_emu()
890 regs->nip, instr); in p9_hmi_special_emu()
895 msr = regs->msr; /* Grab msr before we flush the bits */ in p9_hmi_special_emu()
915 ea = regs->gpr[rb] + (ra ? regs->gpr[ra] : 0); in p9_hmi_special_emu()
925 regs->nip, instr, (unsigned long)addr); in p9_hmi_special_emu()
940 regs->nip, instr, (unsigned long)addr); in p9_hmi_special_emu()
946 smp_processor_id(), current->comm, current->pid, regs->nip, in p9_hmi_special_emu()
966 regs->nip, instr, msr); in p9_hmi_special_emu()
973 PPC_WARN_EMULATED(lxvw4x, regs); in p9_hmi_special_emu()
976 PPC_WARN_EMULATED(lxvh8x, regs); in p9_hmi_special_emu()
979 PPC_WARN_EMULATED(lxvd2x, regs); in p9_hmi_special_emu()
982 PPC_WARN_EMULATED(lxvb16x, regs); in p9_hmi_special_emu()
1045 regs_add_return_ip(regs, 4); in p9_hmi_special_emu()
1053 old_regs = set_irq_regs(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1065 p9_hmi_special_emu(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1071 ppc_md.handle_hmi_exception(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1079 regs->nip, regs->msr, regs->trap); in DEFINE_INTERRUPT_HANDLER()
1081 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER()
1087 regs->nip, regs->msr, regs->trap); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1089 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1095 regs->nip, regs->msr, regs->trap); in DEFINE_INTERRUPT_HANDLER_NMI()
1097 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER_NMI()
1104 if (notify_die(DIE_IABR_MATCH, "iabr_match", regs, 5, in DEFINE_INTERRUPT_HANDLER()
1107 if (debugger_iabr_match(regs)) in DEFINE_INTERRUPT_HANDLER()
1109 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1114 _exception(SIGTRAP, regs, TRAP_UNK, 0); in DEFINE_INTERRUPT_HANDLER()
1117 static void __single_step_exception(struct pt_regs *regs) in __single_step_exception() argument
1119 clear_single_step(regs); in __single_step_exception()
1120 clear_br_trace(regs); in __single_step_exception()
1122 if (kprobe_post_handler(regs)) in __single_step_exception()
1125 if (notify_die(DIE_SSTEP, "single_step", regs, 5, in __single_step_exception()
1128 if (debugger_sstep(regs)) in __single_step_exception()
1131 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); in __single_step_exception()
1136 __single_step_exception(regs); in DEFINE_INTERRUPT_HANDLER()
1145 static void emulate_single_step(struct pt_regs *regs) in emulate_single_step() argument
1147 if (single_stepping(regs)) in emulate_single_step()
1148 __single_step_exception(regs); in emulate_single_step()
1178 static void parse_fpe(struct pt_regs *regs) in parse_fpe() argument
1188 _exception(SIGFPE, regs, code, regs->nip); in parse_fpe()
1202 static int emulate_string_inst(struct pt_regs *regs, u32 instword) in emulate_string_inst() argument
1216 EA = (rA == 0) ? 0 : regs->gpr[rA]; in emulate_string_inst()
1222 num_bytes = regs->xer & 0x7f; in emulate_string_inst()
1238 if ((regs->msr & MSR_64BIT) == 0) in emulate_string_inst()
1249 regs->gpr[rT] = 0; in emulate_string_inst()
1250 regs->gpr[rT] |= val << shift; in emulate_string_inst()
1254 val = regs->gpr[rT] >> shift; in emulate_string_inst()
1274 static int emulate_popcntb_inst(struct pt_regs *regs, u32 instword) in emulate_popcntb_inst() argument
1282 tmp = regs->gpr[rs]; in emulate_popcntb_inst()
1286 regs->gpr[ra] = tmp; in emulate_popcntb_inst()
1291 static int emulate_isel(struct pt_regs *regs, u32 instword) in emulate_isel() argument
1300 tmp = (rA == 0) ? 0 : regs->gpr[rA]; in emulate_isel()
1301 bit = (regs->ccr >> (31 - BC)) & 0x1; in emulate_isel()
1303 regs->gpr[rT] = bit ? tmp : regs->gpr[rB]; in emulate_isel()
1309 static inline bool tm_abort_check(struct pt_regs *regs, int cause) in tm_abort_check() argument
1316 if (MSR_TM_TRANSACTIONAL(regs->msr)) { in tm_abort_check()
1324 static inline bool tm_abort_check(struct pt_regs *regs, int reason) in tm_abort_check() argument
1330 static int emulate_instruction(struct pt_regs *regs) in emulate_instruction() argument
1335 if (!user_mode(regs)) in emulate_instruction()
1338 if (get_user(instword, (u32 __user *)(regs->nip))) in emulate_instruction()
1343 PPC_WARN_EMULATED(mfpvr, regs); in emulate_instruction()
1345 regs->gpr[rd] = mfspr(SPRN_PVR); in emulate_instruction()
1351 PPC_WARN_EMULATED(dcba, regs); in emulate_instruction()
1360 PPC_WARN_EMULATED(mcrxr, regs); in emulate_instruction()
1361 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk); in emulate_instruction()
1362 regs->xer &= ~0xf0000000UL; in emulate_instruction()
1368 if (tm_abort_check(regs, in emulate_instruction()
1371 PPC_WARN_EMULATED(string, regs); in emulate_instruction()
1372 return emulate_string_inst(regs, instword); in emulate_instruction()
1377 PPC_WARN_EMULATED(popcntb, regs); in emulate_instruction()
1378 return emulate_popcntb_inst(regs, instword); in emulate_instruction()
1383 PPC_WARN_EMULATED(isel, regs); in emulate_instruction()
1384 return emulate_isel(regs, instword); in emulate_instruction()
1389 PPC_WARN_EMULATED(sync, regs); in emulate_instruction()
1401 PPC_WARN_EMULATED(mfdscr, regs); in emulate_instruction()
1403 regs->gpr[rd] = mfspr(SPRN_DSCR); in emulate_instruction()
1412 PPC_WARN_EMULATED(mtdscr, regs); in emulate_instruction()
1414 current->thread.dscr = regs->gpr[rd]; in emulate_instruction()
1430 static int emulate_math(struct pt_regs *regs) in emulate_math() argument
1434 ret = do_mathemu(regs); in emulate_math()
1436 PPC_WARN_EMULATED(math, regs); in emulate_math()
1440 emulate_single_step(regs); in emulate_math()
1445 _exception(SIGFPE, regs, code, regs->nip); in emulate_math()
1449 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); in emulate_math()
1456 static inline int emulate_math(struct pt_regs *regs) { return -1; } in emulate_math() argument
1459 static void do_program_check(struct pt_regs *regs) in do_program_check() argument
1461 unsigned int reason = get_reason(regs); in do_program_check()
1468 parse_fpe(regs); in do_program_check()
1475 if (debugger_bpt(regs)) in do_program_check()
1478 if (kprobe_handler(regs)) in do_program_check()
1482 if (notify_die(DIE_BPT, "breakpoint", regs, 5, 5, SIGTRAP) in do_program_check()
1486 bugaddr = regs->nip; in do_program_check()
1490 if (!is_kernel_addr(bugaddr) && !(regs->msr & MSR_IR)) in do_program_check()
1493 if (!(regs->msr & MSR_PR) && /* not user-mode */ in do_program_check()
1494 report_bug(bugaddr, regs) == BUG_TRAP_TYPE_WARN) { in do_program_check()
1499 regs_set_return_ip(regs, extable_fixup(entry) + regs->nip - bugaddr); in do_program_check()
1503 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); in do_program_check()
1523 if (user_mode(regs)) { in do_program_check()
1524 _exception(SIGILL, regs, ILL_ILLOPN, regs->nip); in do_program_check()
1529 regs->nip, regs->msr, get_paca()->tm_scratch); in do_program_check()
1530 die("Unrecoverable exception", regs, SIGABRT); in do_program_check()
1542 if (!user_mode(regs)) in do_program_check()
1545 interrupt_cond_local_irq_enable(regs); in do_program_check()
1555 if (!emulate_math(regs)) in do_program_check()
1560 switch (emulate_instruction(regs)) { in do_program_check()
1562 regs_add_return_ip(regs, 4); in do_program_check()
1563 emulate_single_step(regs); in do_program_check()
1566 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); in do_program_check()
1573 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); in do_program_check()
1575 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in do_program_check()
1581 do_program_check(regs); in DEFINE_INTERRUPT_HANDLER()
1590 regs_set_return_msr(regs, regs->msr | REASON_ILLEGAL); in DEFINE_INTERRUPT_HANDLER()
1591 do_program_check(regs); in DEFINE_INTERRUPT_HANDLER()
1599 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
1601 reason = get_reason(regs); in DEFINE_INTERRUPT_HANDLER()
1608 if (tm_abort_check(regs, TM_CAUSE_ALIGNMENT | TM_CAUSE_PERSISTENT)) in DEFINE_INTERRUPT_HANDLER()
1613 fixed = fix_alignment(regs); in DEFINE_INTERRUPT_HANDLER()
1617 regs_add_return_ip(regs, inst_length(reason)); in DEFINE_INTERRUPT_HANDLER()
1618 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
1631 if (user_mode(regs)) in DEFINE_INTERRUPT_HANDLER()
1632 _exception(sig, regs, code, regs->dar); in DEFINE_INTERRUPT_HANDLER()
1634 bad_page_fault(regs, sig); in DEFINE_INTERRUPT_HANDLER()
1639 die("Kernel stack overflow", regs, SIGSEGV); in DEFINE_INTERRUPT_HANDLER()
1645 "%lx at %lx\n", regs->trap, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1646 die("Unrecoverable FP Unavailable Exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1651 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
1654 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1659 "%lx at %lx\n", regs->trap, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1660 die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1665 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
1668 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1673 "%lx at %lx\n", regs->trap, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1674 die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1678 static void tm_unavailable(struct pt_regs *regs) in tm_unavailable() argument
1681 if (user_mode(regs)) { in tm_unavailable()
1683 regs_set_return_msr(regs, regs->msr | MSR_TM); in tm_unavailable()
1690 "%lx at %lx\n", regs->trap, regs->nip); in tm_unavailable()
1691 die("Unrecoverable TM Unavailable Exception", regs, SIGABRT); in tm_unavailable()
1715 hv = (TRAP(regs) == INTERRUPT_H_FAC_UNAVAIL); in DEFINE_INTERRUPT_HANDLER()
1728 if (!user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
1730 facility, status, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1731 die("Unexpected facility unavailable exception", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()
1734 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
1753 if (get_user(instword, (u32 __user *)(regs->nip))) { in DEFINE_INTERRUPT_HANDLER()
1762 current->thread.dscr = regs->gpr[rd]; in DEFINE_INTERRUPT_HANDLER()
1771 if (emulate_instruction(regs)) { in DEFINE_INTERRUPT_HANDLER()
1775 regs_add_return_ip(regs, 4); in DEFINE_INTERRUPT_HANDLER()
1776 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
1798 tm_unavailable(regs); in DEFINE_INTERRUPT_HANDLER()
1803 hv ? "Hypervisor " : "", facility, status, regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1806 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
1817 regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1853 regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1871 regs->nip, regs->msr); in DEFINE_INTERRUPT_HANDLER()
1891 perf_irq(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
1902 perf_irq(regs); in DEFINE_INTERRUPT_HANDLER_ASYNC()
1913 if (IS_ENABLED(CONFIG_PPC64) && unlikely(arch_irq_disabled_regs(regs))) in DEFINE_INTERRUPT_HANDLER_RAW()
1914 performance_monitor_exception_nmi(regs); in DEFINE_INTERRUPT_HANDLER_RAW()
1916 performance_monitor_exception_async(regs); in DEFINE_INTERRUPT_HANDLER_RAW()
1922 static void handle_debug(struct pt_regs *regs, unsigned long debug_status) in handle_debug() argument
1934 do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, in handle_debug()
1939 do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, in handle_debug()
1945 do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, in handle_debug()
1950 do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, in handle_debug()
1956 do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, in handle_debug()
1961 do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, in handle_debug()
1972 regs_set_return_msr(regs, regs->msr | MSR_DE); in handle_debug()
1983 unsigned long debug_status = regs->dsisr; in DEFINE_INTERRUPT_HANDLER()
1993 regs_set_return_msr(regs, regs->msr & ~MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2001 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
2004 regs_set_return_msr(regs, regs->msr | MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2008 if (kprobe_post_handler(regs)) in DEFINE_INTERRUPT_HANDLER()
2011 if (notify_die(DIE_SSTEP, "block_step", regs, 5, in DEFINE_INTERRUPT_HANDLER()
2015 if (debugger_sstep(regs)) in DEFINE_INTERRUPT_HANDLER()
2018 regs_set_return_msr(regs, regs->msr & ~MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2025 if (kprobe_post_handler(regs)) in DEFINE_INTERRUPT_HANDLER()
2028 if (notify_die(DIE_SSTEP, "single_step", regs, 5, in DEFINE_INTERRUPT_HANDLER()
2033 if (debugger_sstep(regs)) in DEFINE_INTERRUPT_HANDLER()
2036 if (user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
2040 regs_set_return_msr(regs, regs->msr | MSR_DE); in DEFINE_INTERRUPT_HANDLER()
2046 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2048 handle_debug(regs, debug_status); in DEFINE_INTERRUPT_HANDLER()
2057 if (!user_mode(regs)) { in DEFINE_INTERRUPT_HANDLER()
2059 " at %lx\n", regs->nip); in DEFINE_INTERRUPT_HANDLER()
2060 die("Kernel VMX/Altivec assist exception", regs, SIGILL); in DEFINE_INTERRUPT_HANDLER()
2065 PPC_WARN_EMULATED(altivec, regs); in DEFINE_INTERRUPT_HANDLER()
2066 err = emulate_altivec(regs); in DEFINE_INTERRUPT_HANDLER()
2068 regs_add_return_ip(regs, 4); /* skip emulated instruction */ in DEFINE_INTERRUPT_HANDLER()
2069 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
2075 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2080 "in %s at %lx\n", current->comm, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2089 unsigned long error_code = regs->dsisr; in DEFINE_INTERRUPT_HANDLER()
2096 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2104 extern int do_spe_mathemu(struct pt_regs *regs); in DEFINE_INTERRUPT_HANDLER()
2110 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
2131 err = do_spe_mathemu(regs); in DEFINE_INTERRUPT_HANDLER()
2133 regs_add_return_ip(regs, 4); /* skip emulated instruction */ in DEFINE_INTERRUPT_HANDLER()
2134 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
2140 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2144 "in %s at %lx\n", current->comm, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2146 _exception(SIGFPE, regs, code, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2154 extern int speround_handler(struct pt_regs *regs); in DEFINE_INTERRUPT_HANDLER()
2157 interrupt_cond_local_irq_enable(regs); in DEFINE_INTERRUPT_HANDLER()
2160 if (regs->msr & MSR_SPE) in DEFINE_INTERRUPT_HANDLER()
2164 regs_add_return_ip(regs, -4); in DEFINE_INTERRUPT_HANDLER()
2165 err = speround_handler(regs); in DEFINE_INTERRUPT_HANDLER()
2167 regs_add_return_ip(regs, 4); /* skip emulated instruction */ in DEFINE_INTERRUPT_HANDLER()
2168 emulate_single_step(regs); in DEFINE_INTERRUPT_HANDLER()
2174 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2178 "in %s at %lx\n", current->comm, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2180 _exception(SIGFPE, regs, FPE_FLTUNK, regs->nip); in DEFINE_INTERRUPT_HANDLER()
2192 void __noreturn unrecoverable_exception(struct pt_regs *regs) in unrecoverable_exception() argument
2195 regs->trap, regs->nip, regs->msr); in unrecoverable_exception()
2196 die("Unrecoverable exception", regs, SIGABRT); in unrecoverable_exception()
2207 void __attribute__ ((weak)) WatchdogHandler(struct pt_regs *regs) in WatchdogHandler() argument
2217 WatchdogHandler(regs); in DEFINE_INTERRUPT_HANDLER_NMI()
2229 regs->gpr[1], regs->nip); in DEFINE_INTERRUPT_HANDLER()
2230 die("Bad kernel stack pointer", regs, SIGABRT); in DEFINE_INTERRUPT_HANDLER()