Lines Matching refs:regs
66 int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
216 void show_regs(struct pt_regs *regs) in show_regs() argument
222 0, regs->regs[1], regs->regs[2], regs->regs[3], in show_regs()
223 regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]); in show_regs()
225 regs->regs[8], regs->regs[9], regs->regs[10], regs->regs[11], in show_regs()
226 regs->regs[12], regs->regs[13], regs->regs[14], regs->regs[15]); in show_regs()
228 regs->regs[16], regs->regs[17], regs->regs[18], regs->regs[19], in show_regs()
229 regs->regs[20], regs->regs[21], regs->regs[22], regs->regs[23]); in show_regs()
231 regs->regs[24], regs->regs[25], in show_regs()
232 regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]); in show_regs()
233 printk("Hi : %08lx\n", regs->hi); in show_regs()
234 printk("Lo : %08lx\n", regs->lo); in show_regs()
239 printk("epc : %08lx %s\n", regs->cp0_epc, print_tainted()); in show_regs()
240 printk("Status: %08lx\n", regs->cp0_status); in show_regs()
241 printk("Cause : %08lx\n", regs->cp0_cause); in show_regs()
245 void show_registers(struct pt_regs *regs) in show_registers() argument
247 show_regs(regs); in show_registers()
250 show_stack((long *) regs->regs[29]); in show_registers()
251 show_trace((long *) regs->regs[29]); in show_registers()
252 show_code((unsigned int *) regs->cp0_epc); in show_registers()
258 void __die(const char * str, struct pt_regs * regs, const char * file, in __die() argument
267 show_registers(regs); in __die()
272 void __die_if_kernel(const char * str, struct pt_regs * regs, in __die_if_kernel() argument
275 if (!user_mode(regs)) in __die_if_kernel()
276 __die(str, regs, file, func, line); in __die_if_kernel()
348 asmlinkage void do_be(struct pt_regs *regs) in do_be() argument
352 int data = regs->cp0_cause & 4; in do_be()
355 if (data && !user_mode(regs)) in do_be()
356 fixup = search_dbe_table(exception_epc(regs)); in do_be()
362 action = board_be_handler(regs, fixup != 0); in do_be()
370 regs->cp0_epc); in do_be()
371 regs->cp0_epc = new_epc; in do_be()
384 regs->cp0_epc, regs->regs[31]); in do_be()
385 die_if_kernel("Oops", regs); in do_be()
389 static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode) in get_insn_opcode() argument
393 epc = (unsigned int *) regs->cp0_epc + in get_insn_opcode()
394 ((regs->cp0_cause & CAUSEF_BD) != 0); in get_insn_opcode()
421 static inline void simulate_ll(struct pt_regs *regs, unsigned int opcode) in simulate_ll() argument
437 vaddr = (unsigned long *)((long)(regs->regs[(opcode & BASE) >> 21]) + offset); in simulate_ll()
455 regs->regs[(opcode & RT) >> 16] = value; in simulate_ll()
457 compute_return_epc(regs); in simulate_ll()
464 static inline void simulate_sc(struct pt_regs *regs, unsigned int opcode) in simulate_sc() argument
480 vaddr = (unsigned long *)((long)(regs->regs[(opcode & BASE) >> 21]) + offset); in simulate_sc()
488 regs->regs[reg] = 0; in simulate_sc()
489 compute_return_epc(regs); in simulate_sc()
493 if (put_user(regs->regs[reg], vaddr)) { in simulate_sc()
498 regs->regs[reg] = 1; in simulate_sc()
500 compute_return_epc(regs); in simulate_sc()
514 static inline int simulate_llsc(struct pt_regs *regs) in simulate_llsc() argument
518 if (unlikely(get_insn_opcode(regs, &opcode))) in simulate_llsc()
522 simulate_ll(regs, opcode); in simulate_llsc()
526 simulate_sc(regs, opcode); in simulate_llsc()
533 asmlinkage void do_ov(struct pt_regs *regs) in do_ov() argument
540 info.si_addr = (void *)regs->cp0_epc; in do_ov()
547 asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) in do_fpe() argument
565 sig = fpu_emulator_cop1Handler (0, regs, in do_fpe()
587 asmlinkage void do_bp(struct pt_regs *regs) in do_bp() argument
592 die_if_kernel("Break instruction in kernel code", regs); in do_bp()
594 if (get_insn_opcode(regs, &opcode)) in do_bp()
622 info.si_addr = (void *)regs->cp0_epc; in do_bp()
630 asmlinkage void do_tr(struct pt_regs *regs) in do_tr() argument
635 if (get_insn_opcode(regs, &opcode)) in do_tr()
657 info.si_addr = (void *)regs->cp0_epc; in do_tr()
665 asmlinkage void do_ri(struct pt_regs *regs) in do_ri() argument
667 die_if_kernel("Reserved instruction in kernel code", regs); in do_ri()
670 if (!simulate_llsc(regs)) in do_ri()
676 asmlinkage void do_cpu(struct pt_regs *regs) in do_cpu() argument
680 die_if_kernel("do_cpu invoked from kernel context!", regs); in do_cpu()
682 cpid = (regs->cp0_cause >> CAUSEB_CE) & 3; in do_cpu()
689 if (!simulate_llsc(regs)) in do_cpu()
703 int sig = fpu_emulator_cop1Handler(0, regs, in do_cpu()
719 asmlinkage void do_mdmx(struct pt_regs *regs) in do_mdmx() argument
724 asmlinkage void do_watch(struct pt_regs *regs) in do_watch() argument
731 show_regs(regs); in do_watch()
735 asmlinkage void do_mcheck(struct pt_regs *regs) in do_mcheck() argument
737 show_regs(regs); in do_mcheck()
745 (regs->cp0_status & ST0_TS) ? "" : "not "); in do_mcheck()
748 asmlinkage void do_reserved(struct pt_regs *regs) in do_reserved() argument
755 show_regs(regs); in do_reserved()
757 (regs->cp0_cause & 0x7f) >> 2); in do_reserved()
816 void ejtag_exception_handler(struct pt_regs *regs) in ejtag_exception_handler() argument
832 old_epc = regs->cp0_epc; in ejtag_exception_handler()
833 regs->cp0_epc = depc; in ejtag_exception_handler()
834 __compute_return_epc(regs); in ejtag_exception_handler()
835 depc = regs->cp0_epc; in ejtag_exception_handler()
836 regs->cp0_epc = old_epc; in ejtag_exception_handler()
850 void nmi_exception_handler(struct pt_regs *regs) in nmi_exception_handler() argument
853 die("NMI", regs); in nmi_exception_handler()