Lines Matching refs:regs

56 extern void xmon(struct pt_regs *regs);
57 extern int xmon_bpt(struct pt_regs *regs);
58 extern int xmon_sstep(struct pt_regs *regs);
59 extern int xmon_iabr_match(struct pt_regs *regs);
60 extern int xmon_dabr_match(struct pt_regs *regs);
61 extern void (*xmon_fault_handler)(struct pt_regs *regs);
65 void (*debugger)(struct pt_regs *regs) = xmon;
66 int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt;
67 int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep;
68 int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match;
69 int (*debugger_dabr_match)(struct pt_regs *regs) = xmon_dabr_match;
70 void (*debugger_fault_handler)(struct pt_regs *regs);
73 void (*debugger)(struct pt_regs *regs);
74 int (*debugger_bpt)(struct pt_regs *regs);
75 int (*debugger_sstep)(struct pt_regs *regs);
76 int (*debugger_iabr_match)(struct pt_regs *regs);
77 int (*debugger_dabr_match)(struct pt_regs *regs);
78 void (*debugger_fault_handler)(struct pt_regs *regs);
81 void (*debugger)(struct pt_regs *regs);
82 int (*debugger_bpt)(struct pt_regs *regs);
83 int (*debugger_sstep)(struct pt_regs *regs);
84 int (*debugger_iabr_match)(struct pt_regs *regs);
85 int (*debugger_dabr_match)(struct pt_regs *regs);
86 void (*debugger_fault_handler)(struct pt_regs *regs);
101 _exception(int signr, siginfo_t *info, struct pt_regs *regs) in _exception() argument
103 if (!user_mode(regs)) in _exception()
105 show_regs(regs); in _exception()
107 debugger(regs); in _exception()
109 print_backtrace((unsigned long *)regs->gpr[1]); in _exception()
110 panic("Exception in kernel pc %lx signal %d",regs->nip,signr); in _exception()
115 debugger(regs); in _exception()
126 static struct rtas_error_log *FWNMI_get_errinfo(struct pt_regs *regs) in FWNMI_get_errinfo() argument
128 unsigned long errdata = regs->gpr[3]; in FWNMI_get_errinfo()
135 regs->gpr[3] = savep[0]; /* restore original r3 */ in FWNMI_get_errinfo()
157 SystemResetException(struct pt_regs *regs) in SystemResetException() argument
162 unsigned long *r3 = __va(regs->gpr[3]); /* for FWNMI debug */ in SystemResetException()
167 xmon(regs); in SystemResetException()
172 kdb_reset_debugger(regs); in SystemResetException()
185 static int recover_mce(struct pt_regs *regs, struct rtas_error_log *errp) in recover_mce() argument
194 } else if ((regs->msr & MSR_RI) && in recover_mce()
195 user_mode(regs) && in recover_mce()
209 info.si_addr = (void *)regs->nip; in recover_mce()
210 _exception(SIGBUS, &info, regs); in recover_mce()
233 MachineCheckException(struct pt_regs *regs) in MachineCheckException() argument
238 errp = FWNMI_get_errinfo(regs); in MachineCheckException()
240 if (errp && recover_mce(regs, errp)) in MachineCheckException()
244 unsigned long long srr1 = regs->msr; in MachineCheckException()
261 debugger_fault_handler(regs); in MachineCheckException()
266 printk(KERN_EMERG "Caused by (from SRR1=%lx): ", regs->msr); in MachineCheckException()
267 show_regs(regs); in MachineCheckException()
269 debugger(regs); in MachineCheckException()
271 print_backtrace((unsigned long *)regs->gpr[1]); in MachineCheckException()
276 SMIException(struct pt_regs *regs) in SMIException() argument
280 debugger(regs); in SMIException()
284 show_regs(regs); in SMIException()
285 print_backtrace((unsigned long *)regs->gpr[1]); in SMIException()
290 UnknownException(struct pt_regs *regs) in UnknownException() argument
295 regs->nip, regs->msr, regs->trap); in UnknownException()
301 _exception(SIGTRAP, &info, regs); in UnknownException()
305 InstructionBreakpointException(struct pt_regs *regs) in InstructionBreakpointException() argument
310 if (debugger_iabr_match(regs)) in InstructionBreakpointException()
316 info.si_addr = (void *)regs->nip; in InstructionBreakpointException()
317 _exception(SIGTRAP, &info, regs); in InstructionBreakpointException()
321 parse_fpe(siginfo_t *info, struct pt_regs *regs) in parse_fpe() argument
325 if (regs->msr & MSR_FP) in parse_fpe()
355 info->si_addr = (void *)regs->nip; in parse_fpe()
356 _exception(SIGFPE, info, regs); in parse_fpe()
360 void IllegalAltiVecInstruction(struct pt_regs *regs) in IllegalAltiVecInstruction() argument
367 info.si_addr = (void *)regs->nip; in IllegalAltiVecInstruction()
368 _exception(SIGILL, &info, regs); in IllegalAltiVecInstruction()
373 ProgramCheckException(struct pt_regs *regs) in ProgramCheckException() argument
377 if (regs->msr & 0x100000) { in ProgramCheckException()
380 parse_fpe(&info, regs); in ProgramCheckException()
381 } else if (regs->msr & 0x40000) { in ProgramCheckException()
387 info.si_addr = (void *)regs->nip; in ProgramCheckException()
388 _exception(SIGILL, &info, regs); in ProgramCheckException()
389 } else if (regs->msr & 0x20000) { in ProgramCheckException()
393 if (debugger_bpt(regs)) in ProgramCheckException()
399 info.si_addr = (void *)regs->nip; in ProgramCheckException()
400 _exception(SIGTRAP, &info, regs); in ProgramCheckException()
407 info.si_addr = (void *)regs->nip; in ProgramCheckException()
408 _exception(SIGILL, &info, regs); in ProgramCheckException()
413 KernelFPUnavailableException(struct pt_regs *regs) in KernelFPUnavailableException() argument
416 current, regs->nip, regs->trap); in KernelFPUnavailableException()
422 KernelAltiVecUnavailableException(struct pt_regs *regs) in KernelAltiVecUnavailableException() argument
425 (unsigned long)current, regs->nip, (unsigned int)regs->trap); in KernelAltiVecUnavailableException()
430 AltiVecAssistException(struct pt_regs *regs) in AltiVecAssistException() argument
438 if (regs->msr & MSR_VEC) in AltiVecAssistException()
451 _exception(SIGTRAP, &info, regs); in AltiVecAssistException()
456 ThermalInterrupt(struct pt_regs *regs) in ThermalInterrupt() argument
462 SingleStepException(struct pt_regs *regs) in SingleStepException() argument
466 regs->msr &= ~MSR_SE; /* Turn off 'trace' bit */ in SingleStepException()
469 if (debugger_sstep(regs)) in SingleStepException()
475 info.si_addr = (void *)regs->nip; in SingleStepException()
476 _exception(SIGTRAP, &info, regs); in SingleStepException()
480 AlignmentException(struct pt_regs *regs) in AlignmentException() argument
485 fixed = fix_alignment(regs); in AlignmentException()
488 if (!user_mode(regs)) in AlignmentException()
489 PPCDBG(PPCDBG_ALIGNFIXUP, "fix alignment at %lx\n", regs->nip); in AlignmentException()
490 regs->nip += 4; /* skip over emulated instruction */ in AlignmentException()
496 if (user_mode(regs)) { in AlignmentException()
500 info.si_addr = (void *)regs->dar; in AlignmentException()
504 bad_page_fault(regs, regs->dar); in AlignmentException()
513 info.si_addr = (void *)regs->nip; in AlignmentException()
514 _exception(SIGBUS, &info, regs); in AlignmentException()