summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-04-27 09:38:21 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-19 15:47:53 +0200
commitfea435a2027a88407181c387f62daabf30bb5ea7 (patch)
tree70be5506a5b56c795fe5487cdbb54ff9e2a35556 /arch
parent9f876d67663c8412a386321d94b17b68105b13ac (diff)
x86/fpu: Simplify fpu__save()
Factor out a common call. 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/fpu/core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 00408149de40..a0b2221b686d 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -180,12 +180,9 @@ void fpu__save(struct fpu *fpu)
preempt_disable();
if (fpu->fpregs_active) {
- if (use_eager_fpu()) {
- copy_fpregs_to_fpstate(fpu);
- } else {
- copy_fpregs_to_fpstate(fpu);
+ copy_fpregs_to_fpstate(fpu);
+ if (!use_eager_fpu())
fpregs_deactivate(fpu);
- }
}
preempt_enable();
}