Lines Matching refs:regs
101 static void dump_instr(const char *lvl, struct pt_regs *regs) in dump_instr() argument
103 unsigned long addr = instruction_pointer(regs); in dump_instr()
133 static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) in dump_backtrace() argument
137 pr_debug("%s(regs = %p tsk = %p)\n", __func__, regs, tsk); in dump_backtrace()
142 if (regs) { in dump_backtrace()
143 frame.fp = regs->regs[29]; in dump_backtrace()
144 frame.sp = regs->sp; in dump_backtrace()
145 frame.pc = regs->pc; in dump_backtrace()
189 struct pt_regs *regs) in __die() argument
199 ret = notify_die(DIE_OOPS, str, regs, err, 0, SIGSEGV); in __die()
204 __show_regs(regs); in __die()
208 if (!user_mode(regs) || in_interrupt()) { in __die()
209 dump_mem(KERN_EMERG, "Stack: ", regs->sp, in __die()
211 dump_backtrace(regs, tsk); in __die()
212 dump_instr(KERN_EMERG, regs); in __die()
223 void die(const char *str, struct pt_regs *regs, int err) in die() argument
233 ret = __die(str, err, thread, regs); in die()
235 if (regs && kexec_should_crash(thread->task)) in die()
236 crash_kexec(regs); in die()
251 void arm64_notify_die(const char *str, struct pt_regs *regs, in arm64_notify_die() argument
254 if (user_mode(regs)) { in arm64_notify_die()
259 die(str, regs, err); in arm64_notify_die()
284 static int call_undef_hook(struct pt_regs *regs) in call_undef_hook() argument
289 int (*fn)(struct pt_regs *regs, u32 instr) = NULL; in call_undef_hook()
290 void __user *pc = (void __user *)instruction_pointer(regs); in call_undef_hook()
292 if (!user_mode(regs)) in call_undef_hook()
295 if (compat_thumb_mode(regs)) { in call_undef_hook()
318 (regs->pstate & hook->pstate_mask) == hook->pstate_val) in call_undef_hook()
323 return fn ? fn(regs, instr) : 1; in call_undef_hook()
326 asmlinkage void __exception do_undefinstr(struct pt_regs *regs) in do_undefinstr() argument
329 void __user *pc = (void __user *)instruction_pointer(regs); in do_undefinstr()
332 if (!aarch32_break_handler(regs)) in do_undefinstr()
335 if (call_undef_hook(regs) == 0) in do_undefinstr()
342 dump_instr(KERN_INFO, regs); in do_undefinstr()
350 arm64_notify_die("Oops - undefined instruction", regs, &info, 0); in do_undefinstr()
353 long compat_arm_syscall(struct pt_regs *regs);
355 asmlinkage long do_ni_syscall(struct pt_regs *regs) in do_ni_syscall() argument
360 ret = compat_arm_syscall(regs); in do_ni_syscall()
368 task_pid_nr(current), (int)regs->syscallno); in do_ni_syscall()
369 dump_instr("", regs); in do_ni_syscall()
370 if (user_mode(regs)) in do_ni_syscall()
371 __show_regs(regs); in do_ni_syscall()
425 asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) in bad_mode() argument
428 void __user *pc = (void __user *)instruction_pointer(regs); in bad_mode()
433 __show_regs(regs); in bad_mode()
440 arm64_notify_die("Oops - bad mode", regs, &info, 0); in bad_mode()