Lines Matching refs:regs
64 int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
209 void show_regs(struct pt_regs *regs) in show_regs() argument
214 0UL, regs->regs[1], regs->regs[2], regs->regs[3]); in show_regs()
216 regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]); in show_regs()
218 regs->regs[8], regs->regs[9], regs->regs[10], regs->regs[11]); in show_regs()
220 regs->regs[12], regs->regs[13], regs->regs[14], regs->regs[15]); in show_regs()
222 regs->regs[16], regs->regs[17], regs->regs[18], regs->regs[19]); in show_regs()
224 regs->regs[20], regs->regs[21], regs->regs[22], regs->regs[23]); in show_regs()
226 regs->regs[24], regs->regs[25]); in show_regs()
228 regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]); in show_regs()
229 printk("Hi : %016lx\n", regs->hi); in show_regs()
230 printk("Lo : %016lx\n", regs->lo); in show_regs()
234 regs->cp0_epc, print_tainted(), regs->cp0_badvaddr); in show_regs()
235 printk("Status : %08x [ ", (unsigned int) regs->cp0_status); in show_regs()
237 if (regs->cp0_status & ST0_KX) printk("KX "); in show_regs()
238 if (regs->cp0_status & ST0_SX) printk("SX "); in show_regs()
239 if (regs->cp0_status & ST0_UX) printk("UX "); in show_regs()
240 switch (regs->cp0_status & ST0_KSU) { in show_regs()
246 if (regs->cp0_status & ST0_ERL) printk("ERL "); in show_regs()
247 if (regs->cp0_status & ST0_EXL) printk("EXL "); in show_regs()
248 if (regs->cp0_status & ST0_IE) printk("IE "); in show_regs()
251 printk("Cause : %08x\n", (unsigned int) regs->cp0_cause); in show_regs()
255 void show_registers(struct pt_regs *regs) in show_registers() argument
257 show_regs(regs); in show_registers()
260 show_stack((long *) regs->regs[29]); in show_registers()
261 show_trace((long *) regs->regs[29]); in show_registers()
262 show_code((unsigned int *) regs->cp0_epc); in show_registers()
268 void __die(const char * str, struct pt_regs * regs, const char * file, in __die() argument
277 show_registers(regs); in __die()
282 void __die_if_kernel(const char * str, struct pt_regs * regs, in __die_if_kernel() argument
285 if (!user_mode(regs)) in __die_if_kernel()
286 __die(str, regs, file, func, line); in __die_if_kernel()
358 asmlinkage void do_be(struct pt_regs *regs) in do_be() argument
362 int data = regs->cp0_cause & 4; in do_be()
365 if (data && !user_mode(regs)) in do_be()
366 fixup = search_dbe_table(exception_epc(regs)); in do_be()
372 action = board_be_handler(regs, fixup != 0); in do_be()
380 regs->cp0_epc); in do_be()
381 regs->cp0_epc = new_epc; in do_be()
394 regs->cp0_epc, regs->regs[31]); in do_be()
395 die_if_kernel("Oops", regs); in do_be()
399 static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode) in get_insn_opcode() argument
403 epc = (unsigned int *) regs->cp0_epc + in get_insn_opcode()
404 ((regs->cp0_cause & CAUSEF_BD) != 0); in get_insn_opcode()
431 static inline void simulate_ll(struct pt_regs *regs, unsigned int opcode) in simulate_ll() argument
447 vaddr = (unsigned long *)((long)(regs->regs[(opcode & BASE) >> 21]) + offset); in simulate_ll()
465 regs->regs[(opcode & RT) >> 16] = value; in simulate_ll()
467 compute_return_epc(regs); in simulate_ll()
474 static inline void simulate_sc(struct pt_regs *regs, unsigned int opcode) in simulate_sc() argument
490 vaddr = (unsigned long *)((long)(regs->regs[(opcode & BASE) >> 21]) + offset); in simulate_sc()
498 regs->regs[reg] = 0; in simulate_sc()
499 compute_return_epc(regs); in simulate_sc()
503 if (put_user(regs->regs[reg], vaddr)) { in simulate_sc()
508 regs->regs[reg] = 1; in simulate_sc()
510 compute_return_epc(regs); in simulate_sc()
524 static inline int simulate_llsc(struct pt_regs *regs) in simulate_llsc() argument
528 if (unlikely(get_insn_opcode(regs, &opcode))) in simulate_llsc()
532 simulate_ll(regs, opcode); in simulate_llsc()
536 simulate_sc(regs, opcode); in simulate_llsc()
543 asmlinkage void do_ov(struct pt_regs *regs) in do_ov() argument
550 info.si_addr = (void *)regs->cp0_epc; in do_ov()
557 asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) in do_fpe() argument
575 sig = fpu_emulator_cop1Handler (0, regs, in do_fpe()
597 asmlinkage void do_bp(struct pt_regs *regs) in do_bp() argument
602 die_if_kernel("Break instruction in kernel code", regs); in do_bp()
604 if (get_insn_opcode(regs, &opcode)) in do_bp()
632 info.si_addr = (void *)regs->cp0_epc; in do_bp()
640 asmlinkage void do_tr(struct pt_regs *regs) in do_tr() argument
645 if (get_insn_opcode(regs, &opcode)) in do_tr()
667 info.si_addr = (void *)regs->cp0_epc; in do_tr()
675 asmlinkage void do_ri(struct pt_regs *regs) in do_ri() argument
677 die_if_kernel("Reserved instruction in kernel code", regs); in do_ri()
680 if (!simulate_llsc(regs)) in do_ri()
686 asmlinkage void do_cpu(struct pt_regs *regs) in do_cpu() argument
690 die_if_kernel("do_cpu invoked from kernel context!", regs); in do_cpu()
692 cpid = (regs->cp0_cause >> CAUSEB_CE) & 3; in do_cpu()
699 if (!simulate_llsc(regs)) in do_cpu()
713 int sig = fpu_emulator_cop1Handler(0, regs, in do_cpu()
729 asmlinkage void do_mdmx(struct pt_regs *regs) in do_mdmx() argument
734 asmlinkage void do_watch(struct pt_regs *regs) in do_watch() argument
741 show_regs(regs); in do_watch()
745 asmlinkage void do_mcheck(struct pt_regs *regs) in do_mcheck() argument
747 show_regs(regs); in do_mcheck()
755 (regs->cp0_status & ST0_TS) ? "" : "not "); in do_mcheck()
758 asmlinkage void do_reserved(struct pt_regs *regs) in do_reserved() argument
765 show_regs(regs); in do_reserved()
767 (regs->cp0_cause & 0x7f) >> 2); in do_reserved()