Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[powerpc.git] / arch / xtensa / kernel / process.c
index 6a44b54..a7c4178 100644 (file)
@@ -16,7 +16,6 @@
  * Kevin Chea
  */
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -64,6 +63,9 @@ EXPORT_SYMBOL(init_task);
 
 struct task_struct *current_set[NR_CPUS] = {&init_task, };
 
+void (*pm_power_off)(void) = NULL;
+EXPORT_SYMBOL(pm_power_off);
+
 
 #if XCHAL_CP_NUM > 0
 
@@ -145,7 +147,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
        int user_mode = user_mode(regs);
 
        /* Set up new TSS. */
-       tos = (unsigned long)p->thread_info + THREAD_SIZE;
+       tos = (unsigned long)task_stack_page(p) + THREAD_SIZE;
        if (user_mode)
                childregs = (struct pt_regs*)(tos - PT_USER_SIZE);
        else
@@ -217,7 +219,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 unsigned long get_wchan(struct task_struct *p)
 {
        unsigned long sp, pc;
-       unsigned long stack_page = (unsigned long) p->thread_info;
+       unsigned long stack_page = (unsigned long) task_stack_page(p);
        int count = 0;
 
        if (!p || p == current || p->state == TASK_RUNNING)