x86/fpu: Change __thread_clear_has_fpu() to 'struct fpu' parameter

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 <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>
This commit is contained in:
Ingo Molnar 2015-04-23 12:08:58 +02:00
parent 276983f808
commit 36fe6175be
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}