[PATCH] frv: task_thread_info(), task_stack_page()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 12 Jan 2006 09:05:53 +0000 (01:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 17:08:54 +0000 (09:08 -0800)
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>
arch/frv/kernel/process.c

index c4488379ac3bf022998274d629f78baccb03f513..0fff8a61ef2a8ba2032ebfb50cfb553ff94cc97b 100644 (file)
@@ -204,7 +204,7 @@ int copy_thread(int nr, unsigned long clone_flags,
 
        regs0 = __kernel_frame0_ptr;
        childregs0 = (struct pt_regs *)
-               ((unsigned long) p->thread_info + THREAD_SIZE - USER_CONTEXT_SIZE);
+               (task_stack_page(p) + THREAD_SIZE - USER_CONTEXT_SIZE);
        childregs = childregs0;
 
        /* set up the userspace frame (the only place that the USP is stored) */
@@ -220,7 +220,7 @@ int copy_thread(int nr, unsigned long clone_flags,
                *childregs = *regs;
                childregs->sp = (unsigned long) childregs0;
                childregs->next_frame = childregs0;
-               childregs->gr15 = (unsigned long) p->thread_info;
+               childregs->gr15 = (unsigned long) task_thread_info(p);
                childregs->gr29 = (unsigned long) p;
        }