diff options
-rw-r--r-- | arch/alpha/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/alpha/kernel/ptrace.c | 2 | ||||
-rw-r--r-- | include/asm-alpha/ptrace.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 7acad7055089..982d732a8705 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -276,7 +276,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
276 | { | 276 | { |
277 | extern void ret_from_fork(void); | 277 | extern void ret_from_fork(void); |
278 | 278 | ||
279 | struct thread_info *childti = p->thread_info; | 279 | struct thread_info *childti = task_thread_info(p); |
280 | struct pt_regs * childregs; | 280 | struct pt_regs * childregs; |
281 | struct switch_stack * childstack, *stack; | 281 | struct switch_stack * childstack, *stack; |
282 | unsigned long stack_offset, settls; | 282 | unsigned long stack_offset, settls; |
@@ -285,7 +285,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
285 | if (!(regs->ps & 8)) | 285 | if (!(regs->ps & 8)) |
286 | stack_offset = (PAGE_SIZE-1) & (unsigned long) regs; | 286 | stack_offset = (PAGE_SIZE-1) & (unsigned long) regs; |
287 | childregs = (struct pt_regs *) | 287 | childregs = (struct pt_regs *) |
288 | (stack_offset + PAGE_SIZE + (long) childti); | 288 | (stack_offset + PAGE_SIZE + task_stack_page(p)); |
289 | 289 | ||
290 | *childregs = *regs; | 290 | *childregs = *regs; |
291 | settls = regs->r20; | 291 | settls = regs->r20; |
@@ -492,7 +492,7 @@ out: | |||
492 | unsigned long | 492 | unsigned long |
493 | thread_saved_pc(task_t *t) | 493 | thread_saved_pc(task_t *t) |
494 | { | 494 | { |
495 | unsigned long base = (unsigned long)t->thread_info; | 495 | unsigned long base = (unsigned long)task_stack_page(t); |
496 | unsigned long fp, sp = task_thread_info(t)->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) { |
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 961008c3d422..9069281313a3 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c | |||
@@ -110,7 +110,7 @@ get_reg_addr(struct task_struct * task, unsigned long regno) | |||
110 | zero = 0; | 110 | zero = 0; |
111 | addr = &zero; | 111 | addr = &zero; |
112 | } else { | 112 | } else { |
113 | addr = (void *)task->thread_info + regoff[regno]; | 113 | addr = task_stack_page(task) + regoff[regno]; |
114 | } | 114 | } |
115 | return addr; | 115 | return addr; |
116 | } | 116 | } |
diff --git a/include/asm-alpha/ptrace.h b/include/asm-alpha/ptrace.h index 072375c135b4..994680b73a87 100644 --- a/include/asm-alpha/ptrace.h +++ b/include/asm-alpha/ptrace.h | |||
@@ -76,7 +76,7 @@ struct switch_stack { | |||
76 | extern void show_regs(struct pt_regs *); | 76 | extern void show_regs(struct pt_regs *); |
77 | 77 | ||
78 | #define alpha_task_regs(task) \ | 78 | #define alpha_task_regs(task) \ |
79 | ((struct pt_regs *) ((long) (task)->thread_info + 2*PAGE_SIZE) - 1) | 79 | ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) |
80 | 80 | ||
81 | #define force_successful_syscall_return() (alpha_task_regs(current)->r0 = 0) | 81 | #define force_successful_syscall_return() (alpha_task_regs(current)->r0 = 0) |
82 | 82 | ||