diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 01:05:36 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 09:08:50 -0800 |
commit | 27f451304aa6f2bccf34ef3c2b049c01d05d6fff (patch) | |
tree | f4593b303847acb33885ea2638c5ef96a82945dd | |
parent | 37bfbaf995d2c1f8196ee04c9d6f68258d5ec3e8 (diff) |
[PATCH] alpha: task_stack_page()
use task_stack_page() for accesses to stack page of task in alpha-specific
parts of tree
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-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 7acad705508..982d732a870 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, { extern void ret_from_fork(void); - struct thread_info *childti = p->thread_info; + struct thread_info *childti = task_thread_info(p); struct pt_regs * childregs; struct switch_stack * childstack, *stack; unsigned long stack_offset, settls; @@ -285,7 +285,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, if (!(regs->ps & 8)) stack_offset = (PAGE_SIZE-1) & (unsigned long) regs; childregs = (struct pt_regs *) - (stack_offset + PAGE_SIZE + (long) childti); + (stack_offset + PAGE_SIZE + task_stack_page(p)); *childregs = *regs; settls = regs->r20; @@ -492,7 +492,7 @@ out: unsigned long thread_saved_pc(task_t *t) { - unsigned long base = (unsigned long)t->thread_info; + unsigned long base = (unsigned long)task_stack_page(t); unsigned long fp, sp = task_thread_info(t)->pcb.ksp; if (sp > base && sp+6*8 < base + 16*1024) { diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 961008c3d42..9069281313a 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) zero = 0; addr = &zero; } else { - addr = (void *)task->thread_info + regoff[regno]; + addr = task_stack_page(task) + regoff[regno]; } return addr; } diff --git a/include/asm-alpha/ptrace.h b/include/asm-alpha/ptrace.h index 072375c135b..994680b73a8 100644 --- a/include/asm-alpha/ptrace.h +++ b/include/asm-alpha/ptrace.h @@ -76,7 +76,7 @@ struct switch_stack { extern void show_regs(struct pt_regs *); #define alpha_task_regs(task) \ - ((struct pt_regs *) ((long) (task)->thread_info + 2*PAGE_SIZE) - 1) + ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) #define force_successful_syscall_return() (alpha_task_regs(current)->r0 = 0) |