Lines Matching refs:regs

28 	struct pt_regs *regs = args->regs;  in __kgdb_notify()  local
30 if (kgdb_handle_exception(1, args->signr, cmd, regs)) in __kgdb_notify()
63 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) in pt_regs_to_gdb_regs() argument
69 memcpy(gr->gpr, regs->gr, sizeof(gr->gpr)); in pt_regs_to_gdb_regs()
70 memcpy(gr->fr, regs->fr, sizeof(gr->fr)); in pt_regs_to_gdb_regs()
72 gr->sr0 = regs->sr[0]; in pt_regs_to_gdb_regs()
73 gr->sr1 = regs->sr[1]; in pt_regs_to_gdb_regs()
74 gr->sr2 = regs->sr[2]; in pt_regs_to_gdb_regs()
75 gr->sr3 = regs->sr[3]; in pt_regs_to_gdb_regs()
76 gr->sr4 = regs->sr[4]; in pt_regs_to_gdb_regs()
77 gr->sr5 = regs->sr[5]; in pt_regs_to_gdb_regs()
78 gr->sr6 = regs->sr[6]; in pt_regs_to_gdb_regs()
79 gr->sr7 = regs->sr[7]; in pt_regs_to_gdb_regs()
81 gr->sar = regs->sar; in pt_regs_to_gdb_regs()
82 gr->iir = regs->iir; in pt_regs_to_gdb_regs()
83 gr->isr = regs->isr; in pt_regs_to_gdb_regs()
84 gr->ior = regs->ior; in pt_regs_to_gdb_regs()
85 gr->ipsw = regs->ipsw; in pt_regs_to_gdb_regs()
86 gr->cr27 = regs->cr27; in pt_regs_to_gdb_regs()
88 gr->iaoq_f = regs->iaoq[0]; in pt_regs_to_gdb_regs()
89 gr->iasq_f = regs->iasq[0]; in pt_regs_to_gdb_regs()
91 gr->iaoq_b = regs->iaoq[1]; in pt_regs_to_gdb_regs()
92 gr->iasq_b = regs->iasq[1]; in pt_regs_to_gdb_regs()
95 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) in gdb_regs_to_pt_regs() argument
100 memcpy(regs->gr, gr->gpr, sizeof(regs->gr)); in gdb_regs_to_pt_regs()
101 memcpy(regs->fr, gr->fr, sizeof(regs->fr)); in gdb_regs_to_pt_regs()
103 regs->sr[0] = gr->sr0; in gdb_regs_to_pt_regs()
104 regs->sr[1] = gr->sr1; in gdb_regs_to_pt_regs()
105 regs->sr[2] = gr->sr2; in gdb_regs_to_pt_regs()
106 regs->sr[3] = gr->sr3; in gdb_regs_to_pt_regs()
107 regs->sr[4] = gr->sr4; in gdb_regs_to_pt_regs()
108 regs->sr[5] = gr->sr5; in gdb_regs_to_pt_regs()
109 regs->sr[6] = gr->sr6; in gdb_regs_to_pt_regs()
110 regs->sr[7] = gr->sr7; in gdb_regs_to_pt_regs()
112 regs->sar = gr->sar; in gdb_regs_to_pt_regs()
113 regs->iir = gr->iir; in gdb_regs_to_pt_regs()
114 regs->isr = gr->isr; in gdb_regs_to_pt_regs()
115 regs->ior = gr->ior; in gdb_regs_to_pt_regs()
116 regs->ipsw = gr->ipsw; in gdb_regs_to_pt_regs()
117 regs->cr27 = gr->cr27; in gdb_regs_to_pt_regs()
119 regs->iaoq[0] = gr->iaoq_f; in gdb_regs_to_pt_regs()
120 regs->iasq[0] = gr->iasq_f; in gdb_regs_to_pt_regs()
122 regs->iaoq[1] = gr->iaoq_b; in gdb_regs_to_pt_regs()
123 regs->iasq[1] = gr->iasq_b; in gdb_regs_to_pt_regs()
129 struct pt_regs *regs = task_pt_regs(task); in sleeping_thread_to_gdb_regs() local
132 gr30 = regs->gr[30]; in sleeping_thread_to_gdb_regs()
133 iaoq = regs->iaoq[0]; in sleeping_thread_to_gdb_regs()
135 regs->gr[30] = regs->ksp; in sleeping_thread_to_gdb_regs()
136 regs->iaoq[0] = regs->kpc; in sleeping_thread_to_gdb_regs()
137 pt_regs_to_gdb_regs(gdb_regs, regs); in sleeping_thread_to_gdb_regs()
139 regs->gr[30] = gr30; in sleeping_thread_to_gdb_regs()
140 regs->iaoq[0] = iaoq; in sleeping_thread_to_gdb_regs()
144 static void step_instruction_queue(struct pt_regs *regs) in step_instruction_queue() argument
146 regs->iaoq[0] = regs->iaoq[1]; in step_instruction_queue()
147 regs->iaoq[1] += 4; in step_instruction_queue()
150 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) in kgdb_arch_set_pc() argument
152 regs->iaoq[0] = ip; in kgdb_arch_set_pc()
153 regs->iaoq[1] = ip + 4; in kgdb_arch_set_pc()
176 struct pt_regs *regs) in kgdb_arch_handle_exception() argument
189 kgdb_arch_set_pc(regs, addr); in kgdb_arch_handle_exception()
190 else if (trap == 9 && regs->iir == in kgdb_arch_handle_exception()
192 step_instruction_queue(regs); in kgdb_arch_handle_exception()
197 kgdb_arch_set_pc(regs, addr); in kgdb_arch_handle_exception()
198 } else if (trap == 9 && regs->iir == in kgdb_arch_handle_exception()
200 step_instruction_queue(regs); in kgdb_arch_handle_exception()
205 regs->gr[0] |= PSW_R; in kgdb_arch_handle_exception()