]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kernel/process_64.c
Merge branches 'x86-cpu-for-linus', 'x86-boot-for-linus', 'x86-cpufeature-for-linus...
[~andy/linux] / arch / x86 / kernel / process_64.c
index eb54dd0fbed6f2b790c83f505504de5ff4472752..442e7bfe10ae5ef2879374498e57026011e5a98f 100644 (file)
@@ -156,9 +156,7 @@ void cpu_idle(void)
                }
 
                tick_nohz_idle_exit();
-               preempt_enable_no_resched();
-               schedule();
-               preempt_disable();
+               schedule_preempt_disabled();
        }
 }
 
@@ -286,6 +284,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
 
        set_tsk_thread_flag(p, TIF_FORK);
 
+       p->fpu_counter = 0;
        p->thread.io_bitmap_ptr = NULL;
 
        savesegment(gs, p->thread.gsindex);
@@ -389,7 +388,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
        unsigned fsindex, gsindex;
        fpu_switch_t fpu;
 
-       fpu = switch_fpu_prepare(prev_p, next_p);
+       fpu = switch_fpu_prepare(prev_p, next_p, cpu);
 
        /*
         * Reload esp0, LDT and the page table pointer: