Merge branch 'drm-forlinus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / arch / xtensa / kernel / process.c
index c83bb0d..f1f5966 100644 (file)
@@ -96,8 +96,9 @@ void cpu_idle(void)
        while (1) {
                while (!need_resched())
                        platform_idle();
-               preempt_enable();
+               preempt_enable_no_resched();
                schedule();
+               preempt_disable();
        }
 }
 
@@ -144,7 +145,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
@@ -216,7 +217,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)
@@ -457,7 +458,7 @@ int
 dump_task_fpu(struct pt_regs *regs, struct task_struct *task, elf_fpregset_t *r)
 {
 /* see asm/coprocessor.h for this magic number 16 */
-#if TOTAL_CPEXTRA_SIZE > 16
+#if XTENSA_CP_EXTRA_SIZE > 16
        do_save_fpregs (r, regs, task);
 
        /*  For now, bit 16 means some extra state may be present:  */