From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162370AbcKAHQb (ORCPT ); Tue, 1 Nov 2016 03:16:31 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45776 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S945993AbcKAHQ2 (ORCPT ); Tue, 1 Nov 2016 03:16:28 -0400 Date: Tue, 1 Nov 2016 00:13:50 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: kvm@vger.kernel.org, quentin.casasnovas@oracle.com, dave.hansen@linux.intel.com, riel@redhat.com, jpoimboe@redhat.com, luto@kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, rusty@rustcorp.com.au, oleg@redhat.com, bp@alien8.de, brgerst@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, dvlasenk@redhat.com, fenghua.yu@intel.com, pbonzini@redhat.com Reply-To: jpoimboe@redhat.com, luto@kernel.org, kvm@vger.kernel.org, riel@redhat.com, dave.hansen@linux.intel.com, quentin.casasnovas@oracle.com, peterz@infradead.org, rusty@rustcorp.com.au, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, brgerst@gmail.com, bp@alien8.de, oleg@redhat.com, fenghua.yu@intel.com, dvlasenk@redhat.com, pbonzini@redhat.com, mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <476d2d5066eda24838853426ea74c94140b50c85.1477951965.git.luto@kernel.org> References: <476d2d5066eda24838853426ea74c94140b50c85.1477951965.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/fpu] x86/fpu: Get rid of two redundant clts() calls Git-Commit-ID: 36fd4f0249f8cb445835acb7c6937a0ffa2b5f14 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 36fd4f0249f8cb445835acb7c6937a0ffa2b5f14 Gitweb: http://git.kernel.org/tip/36fd4f0249f8cb445835acb7c6937a0ffa2b5f14 Author: Andy Lutomirski AuthorDate: Mon, 31 Oct 2016 15:18:42 -0700 Committer: Ingo Molnar CommitDate: Tue, 1 Nov 2016 07:47:53 +0100 x86/fpu: Get rid of two redundant clts() calls CR0.TS is cleared by a direct CR0 write in fpu__init_cpu_generic(). We don't need to call clts() two more times right after that. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Quentin Casasnovas Cc: Rik van Riel Cc: Rusty Russell Cc: Thomas Gleixner Cc: kvm list Link: http://lkml.kernel.org/r/476d2d5066eda24838853426ea74c94140b50c85.1477951965.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/kernel/fpu/init.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index 1a09d13..60dece3 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c @@ -10,15 +10,6 @@ #include /* - * Initialize the TS bit in CR0 according to the style of context-switches - * we are using: - */ -static void fpu__init_cpu_ctx_switch(void) -{ - clts(); -} - -/* * Initialize the registers found in all CPUs, CR0 and CR4: */ static void fpu__init_cpu_generic(void) @@ -55,7 +46,6 @@ void fpu__init_cpu(void) { fpu__init_cpu_generic(); fpu__init_cpu_xstate(); - fpu__init_cpu_ctx_switch(); } /* @@ -290,14 +280,6 @@ void __init fpu__init_system(struct cpuinfo_x86 *c) */ fpu__init_cpu(); - /* - * But don't leave CR0::TS set yet, as some of the FPU setup - * methods depend on being able to execute FPU instructions - * that will fault on a set TS, such as the FXSAVE in - * fpu__init_system_mxcsr(). - */ - clts(); - fpu__init_system_generic(); fpu__init_system_xstate_size_legacy(); fpu__init_system_xstate();