aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/process.c4
-rw-r--r--arch/alpha/kernel/ptrace.c38
-rw-r--r--arch/alpha/kernel/smp.c2
3 files changed, 22 insertions, 22 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index abb739b88ed1..7acad7055089 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -493,7 +493,7 @@ unsigned long
493thread_saved_pc(task_t *t) 493thread_saved_pc(task_t *t)
494{ 494{
495 unsigned long base = (unsigned long)t->thread_info; 495 unsigned long base = (unsigned long)t->thread_info;
496 unsigned long fp, sp = t->thread_info->pcb.ksp; 496 unsigned long fp, sp = task_thread_info(t)->pcb.ksp;
497 497
498 if (sp > base && sp+6*8 < base + 16*1024) { 498 if (sp > base && sp+6*8 < base + 16*1024) {
499 fp = ((unsigned long*)sp)[6]; 499 fp = ((unsigned long*)sp)[6];
@@ -523,7 +523,7 @@ get_wchan(struct task_struct *p)
523 523
524 pc = thread_saved_pc(p); 524 pc = thread_saved_pc(p);
525 if (in_sched_functions(pc)) { 525 if (in_sched_functions(pc)) {
526 schedule_frame = ((unsigned long *)p->thread_info->pcb.ksp)[6]; 526 schedule_frame = ((unsigned long *)task_thread_info(p)->pcb.ksp)[6];
527 return ((unsigned long *)schedule_frame)[12]; 527 return ((unsigned long *)schedule_frame)[12];
528 } 528 }
529 return pc; 529 return pc;
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 9969d212e94d..961008c3d422 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -103,9 +103,9 @@ get_reg_addr(struct task_struct * task, unsigned long regno)
103 unsigned long *addr; 103 unsigned long *addr;
104 104
105 if (regno == 30) { 105 if (regno == 30) {
106 addr = &task->thread_info->pcb.usp; 106 addr = &task_thread_info(task)->pcb.usp;
107 } else if (regno == 65) { 107 } else if (regno == 65) {
108 addr = &task->thread_info->pcb.unique; 108 addr = &task_thread_info(task)->pcb.unique;
109 } else if (regno == 31 || regno > 65) { 109 } else if (regno == 31 || regno > 65) {
110 zero = 0; 110 zero = 0;
111 addr = &zero; 111 addr = &zero;
@@ -125,7 +125,7 @@ get_reg(struct task_struct * task, unsigned long regno)
125 if (regno == 63) { 125 if (regno == 63) {
126 unsigned long fpcr = *get_reg_addr(task, regno); 126 unsigned long fpcr = *get_reg_addr(task, regno);
127 unsigned long swcr 127 unsigned long swcr
128 = task->thread_info->ieee_state & IEEE_SW_MASK; 128 = task_thread_info(task)->ieee_state & IEEE_SW_MASK;
129 swcr = swcr_update_status(swcr, fpcr); 129 swcr = swcr_update_status(swcr, fpcr);
130 return fpcr | swcr; 130 return fpcr | swcr;
131 } 131 }
@@ -139,8 +139,8 @@ static int
139put_reg(struct task_struct *task, unsigned long regno, unsigned long data) 139put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
140{ 140{
141 if (regno == 63) { 141 if (regno == 63) {
142 task->thread_info->ieee_state 142 task_thread_info(task)->ieee_state
143 = ((task->thread_info->ieee_state & ~IEEE_SW_MASK) 143 = ((task_thread_info(task)->ieee_state & ~IEEE_SW_MASK)
144 | (data & IEEE_SW_MASK)); 144 | (data & IEEE_SW_MASK));
145 data = (data & FPCR_DYN_MASK) | ieee_swcr_to_fpcr(data); 145 data = (data & FPCR_DYN_MASK) | ieee_swcr_to_fpcr(data);
146 } 146 }
@@ -188,35 +188,35 @@ ptrace_set_bpt(struct task_struct * child)
188 * branch (emulation can be tricky for fp branches). 188 * branch (emulation can be tricky for fp branches).
189 */ 189 */
190 displ = ((s32)(insn << 11)) >> 9; 190 displ = ((s32)(insn << 11)) >> 9;
191 child->thread_info->bpt_addr[nsaved++] = pc + 4; 191 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4;
192 if (displ) /* guard against unoptimized code */ 192 if (displ) /* guard against unoptimized code */
193 child->thread_info->bpt_addr[nsaved++] 193 task_thread_info(child)->bpt_addr[nsaved++]
194 = pc + 4 + displ; 194 = pc + 4 + displ;
195 DBG(DBG_BPT, ("execing branch\n")); 195 DBG(DBG_BPT, ("execing branch\n"));
196 } else if (op_code == 0x1a) { 196 } else if (op_code == 0x1a) {
197 reg_b = (insn >> 16) & 0x1f; 197 reg_b = (insn >> 16) & 0x1f;
198 child->thread_info->bpt_addr[nsaved++] = get_reg(child, reg_b); 198 task_thread_info(child)->bpt_addr[nsaved++] = get_reg(child, reg_b);
199 DBG(DBG_BPT, ("execing jump\n")); 199 DBG(DBG_BPT, ("execing jump\n"));
200 } else { 200 } else {
201 child->thread_info->bpt_addr[nsaved++] = pc + 4; 201 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4;
202 DBG(DBG_BPT, ("execing normal insn\n")); 202 DBG(DBG_BPT, ("execing normal insn\n"));
203 } 203 }
204 204
205 /* install breakpoints: */ 205 /* install breakpoints: */
206 for (i = 0; i < nsaved; ++i) { 206 for (i = 0; i < nsaved; ++i) {
207 res = read_int(child, child->thread_info->bpt_addr[i], 207 res = read_int(child, task_thread_info(child)->bpt_addr[i],
208 (int *) &insn); 208 (int *) &insn);
209 if (res < 0) 209 if (res < 0)
210 return res; 210 return res;
211 child->thread_info->bpt_insn[i] = insn; 211 task_thread_info(child)->bpt_insn[i] = insn;
212 DBG(DBG_BPT, (" -> next_pc=%lx\n", 212 DBG(DBG_BPT, (" -> next_pc=%lx\n",
213 child->thread_info->bpt_addr[i])); 213 task_thread_info(child)->bpt_addr[i]));
214 res = write_int(child, child->thread_info->bpt_addr[i], 214 res = write_int(child, task_thread_info(child)->bpt_addr[i],
215 BREAKINST); 215 BREAKINST);
216 if (res < 0) 216 if (res < 0)
217 return res; 217 return res;
218 } 218 }
219 child->thread_info->bpt_nsaved = nsaved; 219 task_thread_info(child)->bpt_nsaved = nsaved;
220 return 0; 220 return 0;
221} 221}
222 222
@@ -227,9 +227,9 @@ ptrace_set_bpt(struct task_struct * child)
227int 227int
228ptrace_cancel_bpt(struct task_struct * child) 228ptrace_cancel_bpt(struct task_struct * child)
229{ 229{
230 int i, nsaved = child->thread_info->bpt_nsaved; 230 int i, nsaved = task_thread_info(child)->bpt_nsaved;
231 231
232 child->thread_info->bpt_nsaved = 0; 232 task_thread_info(child)->bpt_nsaved = 0;
233 233
234 if (nsaved > 2) { 234 if (nsaved > 2) {
235 printk("ptrace_cancel_bpt: bogus nsaved: %d!\n", nsaved); 235 printk("ptrace_cancel_bpt: bogus nsaved: %d!\n", nsaved);
@@ -237,8 +237,8 @@ ptrace_cancel_bpt(struct task_struct * child)
237 } 237 }
238 238
239 for (i = 0; i < nsaved; ++i) { 239 for (i = 0; i < nsaved; ++i) {
240 write_int(child, child->thread_info->bpt_addr[i], 240 write_int(child, task_thread_info(child)->bpt_addr[i],
241 child->thread_info->bpt_insn[i]); 241 task_thread_info(child)->bpt_insn[i]);
242 } 242 }
243 return (nsaved != 0); 243 return (nsaved != 0);
244} 244}
@@ -355,7 +355,7 @@ do_sys_ptrace(long request, long pid, long addr, long data,
355 if (!valid_signal(data)) 355 if (!valid_signal(data))
356 break; 356 break;
357 /* Mark single stepping. */ 357 /* Mark single stepping. */
358 child->thread_info->bpt_nsaved = -1; 358 task_thread_info(child)->bpt_nsaved = -1;
359 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 359 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
360 child->exit_code = data; 360 child->exit_code = data;
361 wake_up_process(child); 361 wake_up_process(child);
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index da0be3465791..4b873527ce1c 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -302,7 +302,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle)
302 + hwrpb->processor_offset 302 + hwrpb->processor_offset
303 + cpuid * hwrpb->processor_size); 303 + cpuid * hwrpb->processor_size);
304 hwpcb = (struct pcb_struct *) cpu->hwpcb; 304 hwpcb = (struct pcb_struct *) cpu->hwpcb;
305 ipcb = &idle->thread_info->pcb; 305 ipcb = &task_thread_info(idle)->pcb;
306 306
307 /* Initialize the CPU's HWPCB to something just good enough for 307 /* Initialize the CPU's HWPCB to something just good enough for
308 us to get started. Immediately after starting, we'll swpctx 308 us to get started. Immediately after starting, we'll swpctx