Lines Matching refs:regs
135 static void dump_instr(const char *lvl, struct pt_regs *regs) in dump_instr() argument
137 unsigned long addr = instruction_pointer(regs); in dump_instr()
138 const int thumb = thumb_mode(regs); in dump_instr()
174 static inline void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) in dump_backtrace() argument
176 unwind_backtrace(regs, tsk); in dump_backtrace()
179 static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) in dump_backtrace() argument
189 if (regs) { in dump_backtrace()
190 fp = frame_pointer(regs); in dump_backtrace()
191 mode = processor_mode(regs); in dump_backtrace()
237 static int __die(const char *str, int err, struct pt_regs *regs) in __die() argument
247 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); in __die()
252 __show_regs(regs); in __die()
256 if (!user_mode(regs) || in_interrupt()) { in __die()
257 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp, in __die()
259 dump_backtrace(regs, tsk); in __die()
260 dump_instr(KERN_EMERG, regs); in __die()
293 static void oops_end(unsigned long flags, struct pt_regs *regs, int signr) in oops_end() argument
295 if (regs && kexec_should_crash(current)) in oops_end()
296 crash_kexec(regs); in oops_end()
319 void die(const char *str, struct pt_regs *regs, int err) in die() argument
325 if (!user_mode(regs)) in die()
326 bug_type = report_bug(regs->ARM_pc, regs); in die()
330 if (__die(str, err, regs)) in die()
333 oops_end(flags, regs, sig); in die()
336 void arm_notify_die(const char *str, struct pt_regs *regs, in arm_notify_die() argument
339 if (user_mode(regs)) { in arm_notify_die()
345 die(str, regs, err); in arm_notify_die()
390 static int call_undef_hook(struct pt_regs *regs, unsigned int instr) in call_undef_hook() argument
394 int (*fn)(struct pt_regs *regs, unsigned int instr) = NULL; in call_undef_hook()
399 (regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) in call_undef_hook()
403 return fn ? fn(regs, instr) : 1; in call_undef_hook()
406 asmlinkage void __exception do_undefinstr(struct pt_regs *regs) in do_undefinstr() argument
412 pc = (void __user *)instruction_pointer(regs); in do_undefinstr()
414 if (processor_mode(regs) == SVC_MODE) { in do_undefinstr()
416 if (thumb_mode(regs)) { in do_undefinstr()
426 } else if (thumb_mode(regs)) { in do_undefinstr()
443 if (call_undef_hook(regs, instr) == 0) in do_undefinstr()
451 __show_regs(regs); in do_undefinstr()
452 dump_instr(KERN_INFO, regs); in do_undefinstr()
461 arm_notify_die("Oops - undefined instruction", regs, &info, 0, 6); in do_undefinstr()
476 asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs) in handle_fiq_as_nmi() argument
478 struct pt_regs *old_regs = set_irq_regs(regs); in handle_fiq_as_nmi()
495 asmlinkage void bad_mode(struct pt_regs *regs, int reason) in bad_mode() argument
501 die("Oops - bad mode", regs, 0); in bad_mode()
506 static int bad_syscall(int n, struct pt_regs *regs) in bad_syscall() argument
512 return regs->ARM_r0; in bad_syscall()
519 dump_instr(KERN_ERR, regs); in bad_syscall()
526 info.si_addr = (void __user *)instruction_pointer(regs) - in bad_syscall()
527 (thumb_mode(regs) ? 2 : 4); in bad_syscall()
529 arm_notify_die("Oops - bad syscall", regs, &info, n, 0); in bad_syscall()
531 return regs->ARM_r0; in bad_syscall()
573 asmlinkage int arm_syscall(int no, struct pt_regs *regs) in arm_syscall() argument
578 return bad_syscall(no, regs); in arm_syscall()
587 arm_notify_die("branch through zero", regs, &info, 0, 0); in arm_syscall()
591 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; in arm_syscall()
592 ptrace_break(current, regs); in arm_syscall()
593 return regs->ARM_r0; in arm_syscall()
610 return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); in arm_syscall()
615 regs->ARM_cpsr &= ~MODE32_BIT; in arm_syscall()
616 return regs->ARM_r0; in arm_syscall()
621 regs->ARM_cpsr |= MODE32_BIT; in arm_syscall()
622 return regs->ARM_r0; in arm_syscall()
625 set_tls(regs->ARM_r0); in arm_syscall()
643 struct pt_regs *regs); in arm_syscall()
645 unsigned long addr = regs->ARM_r2; in arm_syscall()
650 regs->ARM_cpsr &= ~PSR_C_BIT; in arm_syscall()
664 val -= regs->ARM_r0; in arm_syscall()
666 *(unsigned long *)addr = regs->ARM_r1; in arm_syscall()
667 regs->ARM_cpsr |= PSR_C_BIT; in arm_syscall()
676 do_DataAbort(addr, 15 + (1 << 11), regs); in arm_syscall()
697 dump_instr("", regs); in arm_syscall()
698 if (user_mode(regs)) { in arm_syscall()
699 __show_regs(regs); in arm_syscall()
700 c_backtrace(frame_pointer(regs), processor_mode(regs)); in arm_syscall()
707 info.si_addr = (void __user *)instruction_pointer(regs) - in arm_syscall()
708 (thumb_mode(regs) ? 2 : 4); in arm_syscall()
710 arm_notify_die("Oops - bad syscall(2)", regs, &info, no, 0); in arm_syscall()
724 static int get_tp_trap(struct pt_regs *regs, unsigned int instr) in get_tp_trap() argument
729 regs->uregs[reg] = current_thread_info()->tp_value[0]; in get_tp_trap()
730 regs->ARM_pc += 4; in get_tp_trap()
765 baddataabort(int code, unsigned long instr, struct pt_regs *regs) in baddataabort() argument
767 unsigned long addr = instruction_pointer(regs); in baddataabort()
774 dump_instr(KERN_ERR, regs); in baddataabort()
784 arm_notify_die("unknown data abort code", regs, &info, instr, 0); in baddataabort()