From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752665AbdFUIXw convert rfc822-to-8bit (ORCPT ); Wed, 21 Jun 2017 04:23:52 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:24616 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752579AbdFUIXv (ORCPT ); Wed, 21 Jun 2017 04:23:51 -0400 MIME-Version: 1.0 Message-ID: Date: Wed, 21 Jun 2017 01:23:37 -0700 (PDT) From: Zhenzhong Duan To: , , Cc: , Zhenzhong Duan , Subject: [PATCH RESEND] Calling check_system_tsc_reliable() before unsynchronized_tsc() X-Mailer: Zimbra on Oracle Beehive Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Content-Disposition: inline X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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(); - detect_art(); } -- 1.7.3