Lines Matching refs:regs

86 void bad_trap(struct pt_regs *regs, long lvl)  in bad_trap()  argument
91 if (notify_die(DIE_TRAP, "bad trap", regs, in bad_trap()
97 die_if_kernel(buffer, regs); in bad_trap()
101 if (regs->tstate & TSTATE_PRIV) { in bad_trap()
103 die_if_kernel(buffer, regs); in bad_trap()
106 regs->tpc &= 0xffffffff; in bad_trap()
107 regs->tnpc &= 0xffffffff; in bad_trap()
112 info.si_addr = (void __user *)regs->tpc; in bad_trap()
117 void bad_trap_tl1(struct pt_regs *regs, long lvl) in bad_trap_tl1() argument
121 if (notify_die(DIE_TRAP_TL1, "bad trap tl1", regs, in bad_trap_tl1()
125 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in bad_trap_tl1()
128 die_if_kernel (buffer, regs); in bad_trap_tl1()
190 void spitfire_insn_access_exception(struct pt_regs *regs, unsigned long sfsr, unsigned long sfar) in spitfire_insn_access_exception() argument
195 if (notify_die(DIE_TRAP, "instruction access exception", regs, in spitfire_insn_access_exception()
199 if (regs->tstate & TSTATE_PRIV) { in spitfire_insn_access_exception()
202 die_if_kernel("Iax", regs); in spitfire_insn_access_exception()
205 regs->tpc &= 0xffffffff; in spitfire_insn_access_exception()
206 regs->tnpc &= 0xffffffff; in spitfire_insn_access_exception()
211 info.si_addr = (void __user *)regs->tpc; in spitfire_insn_access_exception()
218 void spitfire_insn_access_exception_tl1(struct pt_regs *regs, unsigned long sfsr, unsigned long sfa… in spitfire_insn_access_exception_tl1() argument
220 if (notify_die(DIE_TRAP_TL1, "instruction access exception tl1", regs, in spitfire_insn_access_exception_tl1()
224 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in spitfire_insn_access_exception_tl1()
225 spitfire_insn_access_exception(regs, sfsr, sfar); in spitfire_insn_access_exception_tl1()
228 void sun4v_insn_access_exception(struct pt_regs *regs, unsigned long addr, unsigned long type_ctx) in sun4v_insn_access_exception() argument
234 if (notify_die(DIE_TRAP, "instruction access exception", regs, in sun4v_insn_access_exception()
238 if (regs->tstate & TSTATE_PRIV) { in sun4v_insn_access_exception()
242 die_if_kernel("Iax", regs); in sun4v_insn_access_exception()
246 regs->tpc &= 0xffffffff; in sun4v_insn_access_exception()
247 regs->tnpc &= 0xffffffff; in sun4v_insn_access_exception()
257 void sun4v_insn_access_exception_tl1(struct pt_regs *regs, unsigned long addr, unsigned long type_c… in sun4v_insn_access_exception_tl1() argument
259 if (notify_die(DIE_TRAP_TL1, "instruction access exception tl1", regs, in sun4v_insn_access_exception_tl1()
263 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in sun4v_insn_access_exception_tl1()
264 sun4v_insn_access_exception(regs, addr, type_ctx); in sun4v_insn_access_exception_tl1()
267 void spitfire_data_access_exception(struct pt_regs *regs, unsigned long sfsr, unsigned long sfar) in spitfire_data_access_exception() argument
272 if (notify_die(DIE_TRAP, "data access exception", regs, in spitfire_data_access_exception()
276 if (regs->tstate & TSTATE_PRIV) { in spitfire_data_access_exception()
280 entry = search_exception_tables(regs->tpc); in spitfire_data_access_exception()
284 printk("Exception: PC<%016lx> faddr<UNKNOWN>\n", regs->tpc); in spitfire_data_access_exception()
286 regs->tpc, entry->fixup); in spitfire_data_access_exception()
288 regs->tpc = entry->fixup; in spitfire_data_access_exception()
289 regs->tnpc = regs->tpc + 4; in spitfire_data_access_exception()
295 die_if_kernel("Dax", regs); in spitfire_data_access_exception()
308 void spitfire_data_access_exception_tl1(struct pt_regs *regs, unsigned long sfsr, unsigned long sfa… in spitfire_data_access_exception_tl1() argument
310 if (notify_die(DIE_TRAP_TL1, "data access exception tl1", regs, in spitfire_data_access_exception_tl1()
314 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in spitfire_data_access_exception_tl1()
315 spitfire_data_access_exception(regs, sfsr, sfar); in spitfire_data_access_exception_tl1()
318 void sun4v_data_access_exception(struct pt_regs *regs, unsigned long addr, unsigned long type_ctx) in sun4v_data_access_exception() argument
324 if (notify_die(DIE_TRAP, "data access exception", regs, in sun4v_data_access_exception()
328 if (regs->tstate & TSTATE_PRIV) { in sun4v_data_access_exception()
332 entry = search_exception_tables(regs->tpc); in sun4v_data_access_exception()
336 printk("Exception: PC<%016lx> faddr<UNKNOWN>\n", regs->tpc); in sun4v_data_access_exception()
338 regs->tpc, entry->fixup); in sun4v_data_access_exception()
340 regs->tpc = entry->fixup; in sun4v_data_access_exception()
341 regs->tnpc = regs->tpc + 4; in sun4v_data_access_exception()
347 die_if_kernel("Dax", regs); in sun4v_data_access_exception()
351 regs->tpc &= 0xffffffff; in sun4v_data_access_exception()
352 regs->tnpc &= 0xffffffff; in sun4v_data_access_exception()
362 void sun4v_data_access_exception_tl1(struct pt_regs *regs, unsigned long addr, unsigned long type_c… in sun4v_data_access_exception_tl1() argument
364 if (notify_die(DIE_TRAP_TL1, "data access exception tl1", regs, in sun4v_data_access_exception_tl1()
368 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in sun4v_data_access_exception_tl1()
369 sun4v_data_access_exception(regs, addr, type_ctx); in sun4v_data_access_exception_tl1()
477 …ng afsr, unsigned long afar, unsigned long udbh, unsigned long udbl, int tl1, struct pt_regs *regs) in spitfire_cee_log() argument
489 notify_die(DIE_TRAP, "Correctable ECC Error", regs, in spitfire_cee_log()
498 …long afar, unsigned long udbh, unsigned long udbl, unsigned long tt, int tl1, struct pt_regs *regs) in spitfire_ue_log() argument
515 notify_die(DIE_TRAP, "Uncorrectable Error", regs, in spitfire_ue_log()
518 if (regs->tstate & TSTATE_PRIV) { in spitfire_ue_log()
520 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in spitfire_ue_log()
521 die_if_kernel("UE", regs); in spitfire_ue_log()
533 regs->tpc &= 0xffffffff; in spitfire_ue_log()
534 regs->tnpc &= 0xffffffff; in spitfire_ue_log()
544 void spitfire_access_error(struct pt_regs *regs, unsigned long status_encoded, unsigned long afar) in spitfire_access_error() argument
562 regs->tnpc = regs->tpc + 4; in spitfire_access_error()
568 spitfire_ue_log(afsr, afar, udbh, udbl, tt, tl1, regs); in spitfire_access_error()
593 spitfire_cee_log(afsr, afar, udbh, udbl, tl1, regs); in spitfire_access_error()
1139 static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *info, in cheetah_log_errors() argument
1151 regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); in cheetah_log_errors()
1154 printk("TPC<%pS>\n", (void *) regs->tpc); in cheetah_log_errors()
1282 void cheetah_fecc_handler(struct pt_regs *regs, unsigned long afsr, unsigned long afar) in cheetah_fecc_handler() argument
1295 smp_processor_id(), regs->tpc, regs->tnpc, regs->tstate); in cheetah_fecc_handler()
1359 cheetah_log_errors(regs, &local_snapshot, afsr, afar, recoverable); in cheetah_fecc_handler()
1443 void cheetah_cee_handler(struct pt_regs *regs, unsigned long afsr, unsigned long afar) in cheetah_cee_handler() argument
1453 smp_processor_id(), regs->tpc, regs->tnpc, regs->tstate); in cheetah_cee_handler()
1537 cheetah_log_errors(regs, &local_snapshot, afsr, afar, recoverable); in cheetah_cee_handler()
1543 void cheetah_deferred_handler(struct pt_regs *regs, unsigned long afsr, unsigned long afar) in cheetah_deferred_handler() argument
1577 regs->tpc += 4; in cheetah_deferred_handler()
1578 regs->tnpc = regs->tpc + 4; in cheetah_deferred_handler()
1588 smp_processor_id(), regs->tpc, regs->tnpc, regs->tstate); in cheetah_deferred_handler()
1676 cheetah_log_errors(regs, &local_snapshot, afsr, afar, recoverable); in cheetah_deferred_handler()
1691 if ((regs->tstate & TSTATE_PRIV) == 0UL) { in cheetah_deferred_handler()
1697 entry = search_exception_tables(regs->tpc); in cheetah_deferred_handler()
1717 regs->tpc = entry->fixup; in cheetah_deferred_handler()
1718 regs->tnpc = regs->tpc + 4; in cheetah_deferred_handler()
1738 void cheetah_plus_parity_error(int type, struct pt_regs *regs) in cheetah_plus_parity_error() argument
1760 regs->tpc); in cheetah_plus_parity_error()
1761 printk(KERN_EMERG "TPC<%pS>\n", (void *) regs->tpc); in cheetah_plus_parity_error()
1768 regs->tpc); in cheetah_plus_parity_error()
1769 printk(KERN_WARNING "TPC<%pS>\n", (void *) regs->tpc); in cheetah_plus_parity_error()
1918 static void sun4v_report_real_raddr(const char *pfx, struct pt_regs *regs) in sun4v_report_real_raddr() argument
1923 if (!(regs->tstate & TSTATE_PRIV)) in sun4v_report_real_raddr()
1926 insn = *(unsigned int *) regs->tpc; in sun4v_report_real_raddr()
1928 addr = compute_effective_address(regs, insn, 0); in sun4v_report_real_raddr()
1934 static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, in sun4v_log_error() argument
1943 pfx, regs->tpc, (void *) regs->tpc); in sun4v_log_error()
1969 sun4v_report_real_raddr(pfx, regs); in sun4v_log_error()
1991 show_regs(regs); in sun4v_log_error()
2004 void sun4v_resum_error(struct pt_regs *regs, unsigned long offset) in sun4v_resum_error() argument
2038 sun4v_log_error(regs, &local_copy, cpu, in sun4v_resum_error()
2049 void sun4v_resum_overflow(struct pt_regs *regs) in sun4v_resum_overflow() argument
2057 void sun4v_nonresum_error(struct pt_regs *regs, unsigned long offset) in sun4v_nonresum_error() argument
2082 regs->tpc += 4; in sun4v_nonresum_error()
2083 regs->tnpc = regs->tpc + 4; in sun4v_nonresum_error()
2088 sun4v_log_error(regs, &local_copy, cpu, in sun4v_nonresum_error()
2099 void sun4v_nonresum_overflow(struct pt_regs *regs) in sun4v_nonresum_overflow() argument
2107 static void sun4v_tlb_error(struct pt_regs *regs) in sun4v_tlb_error() argument
2109 die_if_kernel("TLB/TSB error", regs); in sun4v_tlb_error()
2117 void sun4v_itlb_error_report(struct pt_regs *regs, int tl) in sun4v_itlb_error_report() argument
2119 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in sun4v_itlb_error_report()
2122 regs->tpc, tl); in sun4v_itlb_error_report()
2123 printk(KERN_EMERG "SUN4V-ITLB: TPC<%pS>\n", (void *) regs->tpc); in sun4v_itlb_error_report()
2124 printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]); in sun4v_itlb_error_report()
2126 (void *) regs->u_regs[UREG_I7]); in sun4v_itlb_error_report()
2132 sun4v_tlb_error(regs); in sun4v_itlb_error_report()
2140 void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) in sun4v_dtlb_error_report() argument
2142 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in sun4v_dtlb_error_report()
2145 regs->tpc, tl); in sun4v_dtlb_error_report()
2146 printk(KERN_EMERG "SUN4V-DTLB: TPC<%pS>\n", (void *) regs->tpc); in sun4v_dtlb_error_report()
2147 printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]); in sun4v_dtlb_error_report()
2149 (void *) regs->u_regs[UREG_I7]); in sun4v_dtlb_error_report()
2155 sun4v_tlb_error(regs); in sun4v_dtlb_error_report()
2170 static void do_fpe_common(struct pt_regs *regs) in do_fpe_common() argument
2172 if (regs->tstate & TSTATE_PRIV) { in do_fpe_common()
2173 regs->tpc = regs->tnpc; in do_fpe_common()
2174 regs->tnpc += 4; in do_fpe_common()
2180 regs->tpc &= 0xffffffff; in do_fpe_common()
2181 regs->tnpc &= 0xffffffff; in do_fpe_common()
2185 info.si_addr = (void __user *)regs->tpc; in do_fpe_common()
2204 void do_fpieee(struct pt_regs *regs) in do_fpieee() argument
2208 if (notify_die(DIE_TRAP, "fpu exception ieee", regs, in do_fpieee()
2212 do_fpe_common(regs); in do_fpieee()
2217 void do_fpother(struct pt_regs *regs) in do_fpother() argument
2223 if (notify_die(DIE_TRAP, "fpu exception other", regs, in do_fpother()
2230 ret = do_mathemu(regs, f, false); in do_fpother()
2235 do_fpe_common(regs); in do_fpother()
2240 void do_tof(struct pt_regs *regs) in do_tof() argument
2245 if (notify_die(DIE_TRAP, "tagged arithmetic overflow", regs, in do_tof()
2249 if (regs->tstate & TSTATE_PRIV) in do_tof()
2250 die_if_kernel("Penguin overflow trap from kernel mode", regs); in do_tof()
2252 regs->tpc &= 0xffffffff; in do_tof()
2253 regs->tnpc &= 0xffffffff; in do_tof()
2258 info.si_addr = (void __user *)regs->tpc; in do_tof()
2265 void do_div0(struct pt_regs *regs) in do_div0() argument
2270 if (notify_die(DIE_TRAP, "integer division by zero", regs, in do_div0()
2274 if (regs->tstate & TSTATE_PRIV) in do_div0()
2275 die_if_kernel("TL0: Kernel divide by zero.", regs); in do_div0()
2277 regs->tpc &= 0xffffffff; in do_div0()
2278 regs->tnpc &= 0xffffffff; in do_div0()
2283 info.si_addr = (void __user *)regs->tpc; in do_div0()
2347 struct pt_regs *regs; in show_stack() local
2353 regs = (struct pt_regs *) (sf + 1); in show_stack()
2355 if (kstack_is_trap_frame(tp, regs)) { in show_stack()
2356 if (!(regs->tstate & TSTATE_PRIV)) in show_stack()
2358 pc = regs->tpc; in show_stack()
2359 fp = regs->u_regs[UREG_I6] + STACK_BIAS; in show_stack()
2389 void __noreturn die_if_kernel(char *str, struct pt_regs *regs) in die_if_kernel() argument
2402 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); in die_if_kernel()
2404 show_regs(regs); in die_if_kernel()
2406 if (regs->tstate & TSTATE_PRIV) { in die_if_kernel()
2409 (regs->u_regs[UREG_FP] + STACK_BIAS); in die_if_kernel()
2422 instruction_dump ((unsigned int *) regs->tpc); in die_if_kernel()
2425 regs->tpc &= 0xffffffff; in die_if_kernel()
2426 regs->tnpc &= 0xffffffff; in die_if_kernel()
2428 user_instruction_dump ((unsigned int __user *) regs->tpc); in die_if_kernel()
2432 if (regs->tstate & TSTATE_PRIV) in die_if_kernel()
2441 void do_illegal_instruction(struct pt_regs *regs) in do_illegal_instruction() argument
2444 unsigned long pc = regs->tpc; in do_illegal_instruction()
2445 unsigned long tstate = regs->tstate; in do_illegal_instruction()
2449 if (notify_die(DIE_TRAP, "illegal instruction", regs, in do_illegal_instruction()
2454 die_if_kernel("Kernel illegal instruction", regs); in do_illegal_instruction()
2459 if (handle_popc(insn, regs)) in do_illegal_instruction()
2462 if (handle_ldf_stq(insn, regs)) in do_illegal_instruction()
2466 if (!vis_emul(regs, insn)) in do_illegal_instruction()
2476 if (do_mathemu(regs, f, true)) in do_illegal_instruction()
2491 void mem_address_unaligned(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr) in mem_address_unaligned() argument
2496 if (notify_die(DIE_TRAP, "memory address unaligned", regs, in mem_address_unaligned()
2500 if (regs->tstate & TSTATE_PRIV) { in mem_address_unaligned()
2501 kernel_unaligned_trap(regs, *((unsigned int *)regs->tpc)); in mem_address_unaligned()
2514 void sun4v_do_mna(struct pt_regs *regs, unsigned long addr, unsigned long type_ctx) in sun4v_do_mna() argument
2518 if (notify_die(DIE_TRAP, "memory address unaligned", regs, in sun4v_do_mna()
2522 if (regs->tstate & TSTATE_PRIV) { in sun4v_do_mna()
2523 kernel_unaligned_trap(regs, *((unsigned int *)regs->tpc)); in sun4v_do_mna()
2534 void do_privop(struct pt_regs *regs) in do_privop() argument
2539 if (notify_die(DIE_TRAP, "privileged operation", regs, in do_privop()
2544 regs->tpc &= 0xffffffff; in do_privop()
2545 regs->tnpc &= 0xffffffff; in do_privop()
2550 info.si_addr = (void __user *)regs->tpc; in do_privop()
2557 void do_privact(struct pt_regs *regs) in do_privact() argument
2559 do_privop(regs); in do_privact()
2563 void do_cee(struct pt_regs *regs) in do_cee() argument
2566 die_if_kernel("TL0: Cache Error Exception", regs); in do_cee()
2569 void do_div0_tl1(struct pt_regs *regs) in do_div0_tl1() argument
2572 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_div0_tl1()
2573 die_if_kernel("TL1: DIV0 Exception", regs); in do_div0_tl1()
2576 void do_fpieee_tl1(struct pt_regs *regs) in do_fpieee_tl1() argument
2579 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_fpieee_tl1()
2580 die_if_kernel("TL1: FPU IEEE Exception", regs); in do_fpieee_tl1()
2583 void do_fpother_tl1(struct pt_regs *regs) in do_fpother_tl1() argument
2586 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_fpother_tl1()
2587 die_if_kernel("TL1: FPU Other Exception", regs); in do_fpother_tl1()
2590 void do_ill_tl1(struct pt_regs *regs) in do_ill_tl1() argument
2593 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_ill_tl1()
2594 die_if_kernel("TL1: Illegal Instruction Exception", regs); in do_ill_tl1()
2597 void do_irq_tl1(struct pt_regs *regs) in do_irq_tl1() argument
2600 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_irq_tl1()
2601 die_if_kernel("TL1: IRQ Exception", regs); in do_irq_tl1()
2604 void do_lddfmna_tl1(struct pt_regs *regs) in do_lddfmna_tl1() argument
2607 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_lddfmna_tl1()
2608 die_if_kernel("TL1: LDDF Exception", regs); in do_lddfmna_tl1()
2611 void do_stdfmna_tl1(struct pt_regs *regs) in do_stdfmna_tl1() argument
2614 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_stdfmna_tl1()
2615 die_if_kernel("TL1: STDF Exception", regs); in do_stdfmna_tl1()
2618 void do_paw(struct pt_regs *regs) in do_paw() argument
2621 die_if_kernel("TL0: Phys Watchpoint Exception", regs); in do_paw()
2624 void do_paw_tl1(struct pt_regs *regs) in do_paw_tl1() argument
2627 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_paw_tl1()
2628 die_if_kernel("TL1: Phys Watchpoint Exception", regs); in do_paw_tl1()
2631 void do_vaw(struct pt_regs *regs) in do_vaw() argument
2634 die_if_kernel("TL0: Virt Watchpoint Exception", regs); in do_vaw()
2637 void do_vaw_tl1(struct pt_regs *regs) in do_vaw_tl1() argument
2640 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_vaw_tl1()
2641 die_if_kernel("TL1: Virt Watchpoint Exception", regs); in do_vaw_tl1()
2644 void do_tof_tl1(struct pt_regs *regs) in do_tof_tl1() argument
2647 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); in do_tof_tl1()
2648 die_if_kernel("TL1: Tag Overflow Exception", regs); in do_tof_tl1()
2651 void do_getpsr(struct pt_regs *regs) in do_getpsr() argument
2653 regs->u_regs[UREG_I0] = tstate_to_psr(regs->tstate); in do_getpsr()
2654 regs->tpc = regs->tnpc; in do_getpsr()
2655 regs->tnpc += 4; in do_getpsr()
2657 regs->tpc &= 0xffffffff; in do_getpsr()
2658 regs->tnpc &= 0xffffffff; in do_getpsr()