aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/fpu-internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
index 217d6d7b9cb0..9c27f44e1c5c 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -79,6 +79,16 @@ static inline void __cpu_disable_lazy_restore(unsigned int cpu)
79 per_cpu(fpu_owner_task, cpu) = NULL; 79 per_cpu(fpu_owner_task, cpu) = NULL;
80} 80}
81 81
82/*
83 * Used to indicate that the FPU state in memory is newer than the FPU
84 * state in registers, and the FPU state should be reloaded next time the
85 * task is run. Only safe on the current task, or non-running tasks.
86 */
87static inline void task_disable_lazy_fpu_restore(struct task_struct *tsk)
88{
89 tsk->thread.fpu.last_cpu = ~0;
90}
91
82static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu) 92static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu)
83{ 93{
84 return new == this_cpu_read_stable(fpu_owner_task) && 94 return new == this_cpu_read_stable(fpu_owner_task) &&