From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030271AbbEES1q (ORCPT ); Tue, 5 May 2015 14:27:46 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:35411 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030658AbbEERw6 (ORCPT ); Tue, 5 May 2015 13:52:58 -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 109/208] x86/fpu: Clean up eager_fpu_init() and rename it to fpu__ctx_switch_init() Date: Tue, 5 May 2015 19:50:01 +0200 Message-Id: <1430848300-27877-31-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 It's not an xsave specific function anymore, so rename it accordingly and also clean it up a bit: - remove the obsolete __init_refok, as the code paths are not mixed anymore - rename it from eager_fpu_init() to fpu__ctx_switch_init() - remove stray 'return;' - make it static to its only user 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/kernel/fpu/init.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index fa9678f13630..d6d582080c3b 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c @@ -167,7 +167,7 @@ __setup("eagerfpu=", eager_fpu_setup); * setup_init_fpu_buf() is __init and it is OK to call it here because * init_xstate_ctx will be unset only once during boot. */ -void __init_refok eager_fpu_init(void) +static void fpu__ctx_switch_init(void) { WARN_ON(current->thread.fpu.fpstate_active); current_thread_info()->status = 0; @@ -191,10 +191,8 @@ void __init_refok eager_fpu_init(void) printk_once(KERN_INFO "x86/fpu: Using '%s' FPU context switches.\n", eagerfpu == ENABLE ? "eager" : "lazy"); - if (!cpu_has_eager_fpu) { + if (!cpu_has_eager_fpu) stts(); - return; - } } /* @@ -214,7 +212,7 @@ void fpu__init_system(void) mxcsr_feature_mask_init(); fpu__init_system_xstate(); - eager_fpu_init(); + fpu__ctx_switch_init(); } void fpu__cpu_init(void) -- 2.1.0