We do this to make the code more readable, and also to be able to eliminate
task_struct usage from most of the FPU code.

Reviewed-by: Borislav Petkov <b...@alien8.de>
Cc: Andy Lutomirski <l...@amacapital.net>
Cc: Dave Hansen <dave.han...@linux.intel.com>
Cc: Fenghua Yu <fenghua...@intel.com>
Cc: H. Peter Anvin <h...@zytor.com>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Oleg Nesterov <o...@redhat.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 arch/x86/include/asm/fpu-internal.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/fpu-internal.h 
b/arch/x86/include/asm/fpu-internal.h
index c005d1fc1247..94c068b6238e 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -324,9 +324,9 @@ static inline int restore_fpu_checking(struct task_struct 
*tsk)
 }
 
 /* Must be paired with an 'stts' after! */
-static inline void __thread_clear_has_fpu(struct task_struct *tsk)
+static inline void __thread_clear_has_fpu(struct fpu *fpu)
 {
-       tsk->thread.fpu.has_fpu = 0;
+       fpu->has_fpu = 0;
        this_cpu_write(fpu_owner_task, NULL);
 }
 
@@ -346,7 +346,7 @@ static inline void __thread_set_has_fpu(struct task_struct 
*tsk)
  */
 static inline void __thread_fpu_end(struct task_struct *tsk)
 {
-       __thread_clear_has_fpu(tsk);
+       __thread_clear_has_fpu(&tsk->thread.fpu);
        if (!use_eager_fpu())
                stts();
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to