Lines Matching full:regs

27 	struct pt_regs *regs = args->regs;  in __kgdb_notify()  local
29 if (kgdb_handle_exception(1, args->signr, cmd, regs)) in __kgdb_notify()
62 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) in pt_regs_to_gdb_regs() argument
68 memcpy(gr->gpr, regs->gr, sizeof(gr->gpr)); in pt_regs_to_gdb_regs()
69 memcpy(gr->fr, regs->fr, sizeof(gr->fr)); in pt_regs_to_gdb_regs()
71 gr->sr0 = regs->sr[0]; in pt_regs_to_gdb_regs()
72 gr->sr1 = regs->sr[1]; in pt_regs_to_gdb_regs()
73 gr->sr2 = regs->sr[2]; in pt_regs_to_gdb_regs()
74 gr->sr3 = regs->sr[3]; in pt_regs_to_gdb_regs()
75 gr->sr4 = regs->sr[4]; in pt_regs_to_gdb_regs()
76 gr->sr5 = regs->sr[5]; in pt_regs_to_gdb_regs()
77 gr->sr6 = regs->sr[6]; in pt_regs_to_gdb_regs()
78 gr->sr7 = regs->sr[7]; in pt_regs_to_gdb_regs()
80 gr->sar = regs->sar; in pt_regs_to_gdb_regs()
81 gr->iir = regs->iir; in pt_regs_to_gdb_regs()
82 gr->isr = regs->isr; in pt_regs_to_gdb_regs()
83 gr->ior = regs->ior; in pt_regs_to_gdb_regs()
84 gr->ipsw = regs->ipsw; in pt_regs_to_gdb_regs()
85 gr->cr27 = regs->cr27; in pt_regs_to_gdb_regs()
87 gr->iaoq_f = regs->iaoq[0]; in pt_regs_to_gdb_regs()
88 gr->iasq_f = regs->iasq[0]; in pt_regs_to_gdb_regs()
90 gr->iaoq_b = regs->iaoq[1]; in pt_regs_to_gdb_regs()
91 gr->iasq_b = regs->iasq[1]; in pt_regs_to_gdb_regs()
94 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) in gdb_regs_to_pt_regs() argument
99 memcpy(regs->gr, gr->gpr, sizeof(regs->gr)); in gdb_regs_to_pt_regs()
100 memcpy(regs->fr, gr->fr, sizeof(regs->fr)); in gdb_regs_to_pt_regs()
102 regs->sr[0] = gr->sr0; in gdb_regs_to_pt_regs()
103 regs->sr[1] = gr->sr1; in gdb_regs_to_pt_regs()
104 regs->sr[2] = gr->sr2; in gdb_regs_to_pt_regs()
105 regs->sr[3] = gr->sr3; in gdb_regs_to_pt_regs()
106 regs->sr[4] = gr->sr4; in gdb_regs_to_pt_regs()
107 regs->sr[5] = gr->sr5; in gdb_regs_to_pt_regs()
108 regs->sr[6] = gr->sr6; in gdb_regs_to_pt_regs()
109 regs->sr[7] = gr->sr7; in gdb_regs_to_pt_regs()
111 regs->sar = gr->sar; in gdb_regs_to_pt_regs()
112 regs->iir = gr->iir; in gdb_regs_to_pt_regs()
113 regs->isr = gr->isr; in gdb_regs_to_pt_regs()
114 regs->ior = gr->ior; in gdb_regs_to_pt_regs()
115 regs->ipsw = gr->ipsw; in gdb_regs_to_pt_regs()
116 regs->cr27 = gr->cr27; in gdb_regs_to_pt_regs()
118 regs->iaoq[0] = gr->iaoq_f; in gdb_regs_to_pt_regs()
119 regs->iasq[0] = gr->iasq_f; in gdb_regs_to_pt_regs()
121 regs->iaoq[1] = gr->iaoq_b; in gdb_regs_to_pt_regs()
122 regs->iasq[1] = gr->iasq_b; in gdb_regs_to_pt_regs()
128 struct pt_regs *regs = task_pt_regs(task); in sleeping_thread_to_gdb_regs() local
131 gr30 = regs->gr[30]; in sleeping_thread_to_gdb_regs()
132 iaoq = regs->iaoq[0]; in sleeping_thread_to_gdb_regs()
134 regs->gr[30] = regs->ksp; in sleeping_thread_to_gdb_regs()
135 regs->iaoq[0] = regs->kpc; in sleeping_thread_to_gdb_regs()
136 pt_regs_to_gdb_regs(gdb_regs, regs); in sleeping_thread_to_gdb_regs()
138 regs->gr[30] = gr30; in sleeping_thread_to_gdb_regs()
139 regs->iaoq[0] = iaoq; in sleeping_thread_to_gdb_regs()
143 static void step_instruction_queue(struct pt_regs *regs) in step_instruction_queue() argument
145 regs->iaoq[0] = regs->iaoq[1]; in step_instruction_queue()
146 regs->iaoq[1] += 4; in step_instruction_queue()
149 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) in kgdb_arch_set_pc() argument
151 regs->iaoq[0] = ip; in kgdb_arch_set_pc()
152 regs->iaoq[1] = ip + 4; in kgdb_arch_set_pc()
175 struct pt_regs *regs) in kgdb_arch_handle_exception() argument
188 kgdb_arch_set_pc(regs, addr); in kgdb_arch_handle_exception()
189 else if (trap == 9 && regs->iir == in kgdb_arch_handle_exception()
191 step_instruction_queue(regs); in kgdb_arch_handle_exception()
196 kgdb_arch_set_pc(regs, addr); in kgdb_arch_handle_exception()
197 } else if (trap == 9 && regs->iir == in kgdb_arch_handle_exception()
199 step_instruction_queue(regs); in kgdb_arch_handle_exception()
204 regs->gr[0] |= PSW_R; in kgdb_arch_handle_exception()