]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/avr32/kernel/process.c
Pull video into release branch
[linux-2.6-omap-h63xx.git] / arch / avr32 / kernel / process.c
index 4e4181ed1c6d52a70a5308a50aa4a2a7761099f0..13f988402613a038133f0e84289565210382600a 100644 (file)
@@ -330,13 +330,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
 {
        struct pt_regs *childregs;
 
-       childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)p->thread_info)) - 1;
+       childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)task_stack_page(p))) - 1;
        *childregs = *regs;
 
        if (user_mode(regs))
                childregs->sp = usp;
        else
-               childregs->sp = (unsigned long)p->thread_info + THREAD_SIZE;
+               childregs->sp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
 
        childregs->r12 = 0; /* Set return value for child */
 
@@ -403,7 +403,7 @@ unsigned long get_wchan(struct task_struct *p)
        if (!p || p == current || p->state == TASK_RUNNING)
                return 0;
 
-       stack_page = (unsigned long)p->thread_info;
+       stack_page = (unsigned long)task_stack_page(p);
        BUG_ON(!stack_page);
 
        /*