From: Ingo Molnar Date: Mon, 27 Apr 2015 07:38:21 +0000 (+0200) Subject: x86/fpu: Simplify fpu__save() X-Git-Tag: v4.2-rc1~170^2~107 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fea435a2027a88407181c387f62daabf30bb5ea7;p=karo-tx-linux.git 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 --- 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(); }