From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030566AbbEERwh (ORCPT ); Tue, 5 May 2015 13:52:37 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:36260 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030487AbbEERwc (ORCPT ); Tue, 5 May 2015 13:52:32 -0400 From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Borislav Petkov , Dave Hansen , Fenghua Yu , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: [PATCH 093/208] x86/fpu: Rename __thread_fpu_end() to fpregs_deactivate() Date: Tue, 5 May 2015 19:49:45 +0200 Message-Id: <1430848300-27877-15-git-send-email-mingo@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430848300-27877-1-git-send-email-mingo@kernel.org> References: <1430848300-27877-1-git-send-email-mingo@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Propagate the 'fpu->fpregs_active' naming to the high level function that clears it. Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu/internal.h | 14 +++++++------- arch/x86/kernel/fpu/core.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index 18a62239c73d..0292fcc4d441 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -335,18 +335,18 @@ static inline void __fpregs_activate(struct fpu *fpu) * These generally need preemption protection to work, * do try to avoid using these on their own. */ -static inline void __thread_fpu_end(struct fpu *fpu) +static inline void fpregs_activate(struct fpu *fpu) { - __fpregs_deactivate(fpu); if (!use_eager_fpu()) - stts(); + clts(); + __fpregs_activate(fpu); } -static inline void fpregs_activate(struct fpu *fpu) +static inline void fpregs_deactivate(struct fpu *fpu) { + __fpregs_deactivate(fpu); if (!use_eager_fpu()) - clts(); - __fpregs_activate(fpu); + stts(); } static inline void drop_fpu(struct fpu *fpu) @@ -362,7 +362,7 @@ static inline void drop_fpu(struct fpu *fpu) asm volatile("1: fwait\n" "2:\n" _ASM_EXTABLE(1b, 2b)); - __thread_fpu_end(fpu); + fpregs_deactivate(fpu); } fpu->fpstate_active = 0; diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index 75b94985c82e..2c47bcf63e1e 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -152,7 +152,7 @@ void fpu__save(struct fpu *fpu) __save_fpu(fpu); } else { fpu_save_init(fpu); - __thread_fpu_end(fpu); + fpregs_deactivate(fpu); } } preempt_enable(); -- 2.1.0