Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756084AbcKJWpn (ORCPT ); Thu, 10 Nov 2016 17:45:43 -0500 Received: from mga14.intel.com ([192.55.52.115]:7337 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756057AbcKJWpk (ORCPT ); Thu, 10 Nov 2016 17:45:40 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,620,1473145200"; d="scan'208";a="29995463" Date: Thu, 10 Nov 2016 14:51:47 -0800 From: Bin Gao To: Thomas Gleixner Cc: Ingo Molnar , H Peter Anvin , "x86@kernel.org Peter Zijlstra" , linux-kernel@vger.kernel.org, Bin Gao Subject: Re: Re: [PATCH 1/2] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag Message-ID: <20161110225147.GA217763@worksta> References: <1478020482-231459-1-git-send-email-bin.gao@intel.com> <1478020482-231459-2-git-send-email-bin.gao@intel.com> <4460FA1017EA3844B646E90DA4E984057E2ECB7C@ORSMSX112.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4460FA1017EA3844B646E90DA4E984057E2ECB7C@ORSMSX112.amr.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 29 > > --- a/arch/x86/kernel/tsc.c > > +++ b/arch/x86/kernel/tsc.c > > @@ -1283,10 +1283,10 @@ static int __init init_tsc_clocksource(void) > > clocksource_tsc.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP; > > > > /* > > - * Trust the results of the earlier calibration on systems > > - * exporting a reliable TSC. > > + * When TSC frequency is known (generally got by MSR or CPUID), we skip > > + * the refined calibration and directly register it as a clocksource. > > */ > > - if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) { > > + if (boot_cpu_has(X86_FEATURE_TSC_KNOWN_FREQ)) { > > This causes a regression, because with only this patch applied the architectures which use the reliable flag for this today are not longer taking this path. > > The proper thing to do here is to make this: > > if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE) || > boot_cpu_has(X86_FEATURE_TSC_KNOWN_FREQ)) { > > and remove the RELIABLE flag ckeck after the existing users are converted. I Will fix this in next revision. > Thanks, > > tglx >