Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755023AbdFLQEL (ORCPT ); Mon, 12 Jun 2017 12:04:11 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34100 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754075AbdFLQEG (ORCPT ); Mon, 12 Jun 2017 12:04:06 -0400 Date: Mon, 12 Jun 2017 18:03:45 +0200 (CEST) From: Thomas Gleixner To: Zhenzhong Duan cc: mingo@redhat.com, hpa@zytor.com, x86@kernel.org, LKML Subject: Re: [PATCH] Calling check_system_tsc_reliable before unsynchronized_tsc In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 974 Lines: 34 On Thu, 8 Jun 2017, Zhenzhong Duan wrote: > unsynchronized_tsc() checks value of tsc_clocksource_reliable which is set by > check_system_tsc_reliable(). It's better to move check_system_tsc_reliable() > at > front, or else this check makes no sense. > > Though X86_FEATURE_CONSTANT_TSC is usually set for TSC reliable system, just > in > case. > > Signed-off-by: Zhenzhong Duan > --- > arch/x86/kernel/tsc.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c > index 714dfba..a316bdd 100644 > --- a/arch/x86/kernel/tsc.c > +++ b/arch/x86/kernel/tsc.c > @@ -1412,11 +1412,11 @@ void __init tsc_init(void) > use_tsc_delay(); > + check_system_tsc_reliable(); > + > if (unsynchronized_tsc()) > mark_tsc_unstable("TSCs unsynchronized"); > - check_system_tsc_reliable(); > - What kind of patch is that? Definitely nothing which can be applied. Thanks, tglx