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>
* 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();
}
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);
__save_fpu(tsk);
} else {
fpu_save_init(fpu);
- __thread_fpu_end(tsk);
+ __thread_fpu_end(fpu);
}
}
preempt_enable();