]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/process_64.c
Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[karo-tx-linux.git] / arch / x86 / kernel / process_64.c
index 43d8b48b23e61dc20afb3ddc0aed3308e7d92f2b..61cdf7fdf09961757d7a6f8ba595df63a5a123b3 100644 (file)
@@ -145,15 +145,6 @@ static inline u32 read_32bit_tls(struct task_struct *t, int tls)
        return get_desc_base(&t->thread.tls_array[tls]);
 }
 
-/*
- * This gets called before we allocate a new thread and copy
- * the current task into it.
- */
-void prepare_to_copy(struct task_struct *tsk)
-{
-       unlazy_fpu(tsk);
-}
-
 int copy_thread(unsigned long clone_flags, unsigned long sp,
                unsigned long unused,
        struct task_struct *p, struct pt_regs *regs)
@@ -237,7 +228,7 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,
        current->thread.usersp  = new_sp;
        regs->ip                = new_ip;
        regs->sp                = new_sp;
-       percpu_write(old_rsp, new_sp);
+       this_cpu_write(old_rsp, new_sp);
        regs->cs                = _cs;
        regs->ss                = _ss;
        regs->flags             = X86_EFLAGS_IF;
@@ -359,11 +350,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
        /*
         * Switch the PDA and FPU contexts.
         */
-       prev->usersp = percpu_read(old_rsp);
-       percpu_write(old_rsp, next->usersp);
-       percpu_write(current_task, next_p);
+       prev->usersp = this_cpu_read(old_rsp);
+       this_cpu_write(old_rsp, next->usersp);
+       this_cpu_write(current_task, next_p);
 
-       percpu_write(kernel_stack,
+       this_cpu_write(kernel_stack,
                  (unsigned long)task_stack_page(next_p) +
                  THREAD_SIZE - KERNEL_STACK_OFFSET);