]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86/fpu: Remove 'struct task_struct' usage from __thread_fpu_end()
authorIngo Molnar <mingo@kernel.org>
Thu, 23 Apr 2015 10:26:55 +0000 (12:26 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:24 +0000 (15:47 +0200)
Migrate this function to pure 'struct fpu' usage.

Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/fpu-internal.h
arch/x86/kernel/fpu/core.c

index cf0d4124fb3d4c3fba20e0730ba1e89cbb9a8f1f..b1803a656651d2e89ec12540fefe134b07fb3dac 100644 (file)
@@ -344,9 +344,9 @@ static inline void __thread_set_has_fpu(struct fpu *fpu)
  * These generally need preemption protection to work,
  * do try to avoid using these on their own.
  */
-static inline void __thread_fpu_end(struct task_struct *tsk)
+static inline void __thread_fpu_end(struct fpu *fpu)
 {
-       __thread_clear_has_fpu(&tsk->thread.fpu);
+       __thread_clear_has_fpu(fpu);
        if (!use_eager_fpu())
                stts();
 }
@@ -372,7 +372,7 @@ static inline void drop_fpu(struct task_struct *tsk)
                asm volatile("1: fwait\n"
                             "2:\n"
                             _ASM_EXTABLE(1b, 2b));
-               __thread_fpu_end(tsk);
+               __thread_fpu_end(fpu);
        }
 
        clear_stopped_child_used_math(tsk);
index ac390c69094437c0937d3ebe853e8f5a39af2924..4e1f8f1bf493a8068cb3cfa9943f24ec6620af4c 100644 (file)
@@ -143,7 +143,7 @@ void fpu__save(struct task_struct *tsk)
                        __save_fpu(tsk);
                } else {
                        fpu_save_init(fpu);
-                       __thread_fpu_end(tsk);
+                       __thread_fpu_end(fpu);
                }
        }
        preempt_enable();