diff options
author | Borislav Petkov <bp@suse.de> | 2015-03-16 12:21:55 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-23 12:13:59 +0300 |
commit | b85e67d1483c72b77d1bdc265aa8ba91590794c1 (patch) | |
tree | d79460926c6fd09bc35d9d3428fa24cc12fa95ea /arch/x86/include/asm/fpu-internal.h | |
parent | d2d0ac9a4644e00120bb9b7427a512a99d2cacc5 (diff) | |
download | linux-b85e67d1483c72b77d1bdc265aa8ba91590794c1.tar.xz |
x86/fpu: Rename drop_init_fpu() to fpu_reset_state()
Call it what it does and in accordance with the context where it is
used: we reset the FPU state either because we were unable to restore it
from the one saved in the task or because we simply want to reset it.
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/fpu-internal.h')
-rw-r--r-- | arch/x86/include/asm/fpu-internal.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 2d4adff428ac..da5e96756570 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -406,7 +406,11 @@ static inline void restore_init_xstate(void) fxrstor_checking(&init_xstate_buf->i387); } -static inline void drop_init_fpu(struct task_struct *tsk) +/* + * Reset the FPU state in the eager case and drop it in the lazy case (later use + * will reinit it). + */ +static inline void fpu_reset_state(struct task_struct *tsk) { if (!use_eager_fpu()) drop_fpu(tsk); @@ -480,7 +484,7 @@ static inline void switch_fpu_finish(struct task_struct *new, fpu_switch_t fpu) { if (fpu.preload) { if (unlikely(restore_fpu_checking(new))) - drop_init_fpu(new); + fpu_reset_state(new); } } |