diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-02-19 11:17:42 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-19 11:19:05 +0100 |
commit | f353e612304ba752d6b613dc02eae8116cd3e27b (patch) | |
tree | a43ba46e221d91e5b958f9e30a23139166947f78 /arch/x86/kernel/i387.c | |
parent | e07e0d4cb0c4bfe822ec8491cc06269096a38bea (diff) | |
parent | 728e53fef429a0f3c9dda3587c3ccc57ad268b70 (diff) |
Merge branch 'tip-x86-fpu' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/fpu
Pull FPU updates from Borislav Petkov:
"A round of updates to the FPU maze from Oleg and Rik. It should make
the code a bit more understandable/readable/streamlined and a preparation
for more cleanups and improvements in that area."
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/i387.c')
-rw-r--r-- | arch/x86/kernel/i387.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 81049ffab2d6..f59d80622e60 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c @@ -119,10 +119,13 @@ void unlazy_fpu(struct task_struct *tsk) { preempt_disable(); if (__thread_has_fpu(tsk)) { - __save_init_fpu(tsk); - __thread_fpu_end(tsk); - } else - tsk->thread.fpu_counter = 0; + if (use_eager_fpu()) { + __save_fpu(tsk); + } else { + __save_init_fpu(tsk); + __thread_fpu_end(tsk); + } + } preempt_enable(); } EXPORT_SYMBOL(unlazy_fpu); @@ -246,7 +249,7 @@ int init_fpu(struct task_struct *tsk) if (tsk_used_math(tsk)) { if (cpu_has_fpu && tsk == current) unlazy_fpu(tsk); - tsk->thread.fpu.last_cpu = ~0; + task_disable_lazy_fpu_restore(tsk); return 0; } |