From fea435a2027a88407181c387f62daabf30bb5ea7 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 27 Apr 2015 09:38:21 +0200 Subject: [PATCH] x86/fpu: Simplify fpu__save() Factor out a common call. Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/kernel/fpu/core.c | 7 ++----- 1 file 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(); } -- 2.39.5