From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697AbdJLPXj (ORCPT ); Thu, 12 Oct 2017 11:23:39 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:38781 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbdJLPXi (ORCPT ); Thu, 12 Oct 2017 11:23:38 -0400 Date: Thu, 12 Oct 2017 17:22:54 +0200 (CEST) From: Thomas Gleixner To: Mike Travis cc: Peter Zijlstra , Ingo Molnar , "H. Peter Anvin" , Bin Gao , Prarit Bhargava , Dimitri Sivanich , Andrew Banman , Russ Anderson , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH 2/5] x86/kernel: Skip TSC test and error messages if already unstable In-Reply-To: <726db3a9-3607-3105-770a-d5e5927b1874@hpe.com> Message-ID: References: <20171005164716.233817374@stormcage.americas.sgi.com> <20171005164716.507003714@stormcage.americas.sgi.com> <726db3a9-3607-3105-770a-d5e5927b1874@hpe.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Oct 2017, Mike Travis wrote: > On 10/12/2017 4:17 AM, Thomas Gleixner wrote: > > On Thu, 5 Oct 2017, mike.travis@hpe.com wrote: > > > @@ -89,6 +93,10 @@ bool tsc_store_and_check_tsc_adjust(bool > > > if (!boot_cpu_has(X86_FEATURE_TSC_ADJUST)) > > > return false; > > > + /* Skip unnecessary error messages if TSC already unstable */ > > > + if (check_tsc_unstable()) > > > + return false; > > > + > > > rdmsrl(MSR_IA32_TSC_ADJUST, bootval); > > > cur->bootval = bootval; > > > cur->adjusted = bootval; > > > > This hunk rejects and I really can't figure out against which tree that > > would apply. > > My current merge tree happens to be 4.13.0-rc1 which was the latest when I > started this patch submission. I can update my merge tree and reapply if need > be? Please send patches always against top of tree and not some random ancient version of it. > > Btw, there are two incarnations of tsc_store_and_check_tsc_adjust(). > > Shouldn't the !SMP variant get the same treatment? > > I could add it though I'm not sure the point? If it's only one CPU would > TSC's being out of sync become a question? Well, this is about TSC_ADJUST and if BIOS/SMM fiddles with TSC_ADJUST behind the kernels back, then our timekeeping is buggered. So we better check that. Thanks, tglx