summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/fpu-internal.h
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2015-02-06 15:02:04 -0500
committerBorislav Petkov <bp@suse.de>2015-02-19 11:15:55 +0100
commit6a5fe8952bd676baf382d14df21e7b32b5d8943e (patch)
treee895e59bd4465828e892d89da4cf199949ac63dc /arch/x86/include/asm/fpu-internal.h
parent1361ef29c7e49ae7cf37220c25fac1904b77f71a (diff)
downloadlinux-6a5fe8952bd676baf382d14df21e7b32b5d8943e.tar.gz
linux-6a5fe8952bd676baf382d14df21e7b32b5d8943e.tar.bz2
linux-6a5fe8952bd676baf382d14df21e7b32b5d8943e.zip
x86/fpu: Use task_disable_lazy_fpu_restore() helper
Replace magic assignments of fpu.last_cpu = ~0 with more explicit task_disable_lazy_fpu_restore() calls. Signed-off-by: Rik van Riel <riel@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1423252925-14451-8-git-send-email-riel@redhat.com Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/include/asm/fpu-internal.h')
-rw-r--r--arch/x86/include/asm/fpu-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
index 04c2807aab66..e5f8f8eaf225 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -439,7 +439,7 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta
if (__thread_has_fpu(old)) {
if (!__save_init_fpu(old))
- old->thread.fpu.last_cpu = ~0;
+ task_disable_lazy_fpu_restore(old);
else
old->thread.fpu.last_cpu = cpu;
@@ -455,7 +455,7 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta
stts();
} else {
old->thread.fpu_counter = 0;
- old->thread.fpu.last_cpu = ~0;
+ task_disable_lazy_fpu_restore(old);
if (fpu.preload) {
new->thread.fpu_counter++;
if (!use_eager_fpu() && fpu_lazy_restore(new, cpu))