From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752262AbeANLp1 (ORCPT + 1 other); Sun, 14 Jan 2018 06:45:27 -0500 Received: from terminus.zytor.com ([65.50.211.136]:48427 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbeANLpZ (ORCPT ); Sun, 14 Jan 2018 06:45:25 -0500 Date: Sun, 14 Jan 2018 03:44:19 -0800 From: tip-bot for Len Brown Message-ID: Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, len.brown@intel.com, hpa@zytor.com, mingo@kernel.org Reply-To: len.brown@intel.com, hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org In-Reply-To: <537b342debcd8e8aebc8d631015dcdf9f9ba8a26.1513920414.git.len.brown@intel.com> References: <537b342debcd8e8aebc8d631015dcdf9f9ba8a26.1513920414.git.len.brown@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/tsc: Print tsc_khz, when it differs from cpu_khz Git-Commit-ID: 4b5b2127238e689ee18aa6752959751dd61c4c73 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 Return-Path: Commit-ID: 4b5b2127238e689ee18aa6752959751dd61c4c73 Gitweb: https://git.kernel.org/tip/4b5b2127238e689ee18aa6752959751dd61c4c73 Author: Len Brown AuthorDate: Fri, 22 Dec 2017 00:27:56 -0500 Committer: Thomas Gleixner CommitDate: Sun, 14 Jan 2018 12:14:50 +0100 x86/tsc: Print tsc_khz, when it differs from cpu_khz If CPU and TSC frequency are the same the printout of the CPU frequency is valid for the TSC as well: tsc: Detected 2900.000 MHz processor If the TSC frequency is different there is no information in dmesg. Add a conditional printout: tsc: Detected 2904.000 MHz TSC Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Link: https://lkml.kernel.org/r/537b342debcd8e8aebc8d631015dcdf9f9ba8a26.1513920414.git.len.brown@intel.com --- arch/x86/kernel/tsc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 3bf4df7..e169e85 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -1316,6 +1316,12 @@ void __init tsc_init(void) (unsigned long)cpu_khz / 1000, (unsigned long)cpu_khz % 1000); + if (cpu_khz != tsc_khz) { + pr_info("Detected %lu.%03lu MHz TSC", + (unsigned long)tsc_khz / 1000, + (unsigned long)tsc_khz % 1000); + } + /* Sanitize TSC ADJUST before cyc2ns gets initialized */ tsc_store_and_check_tsc_adjust(true);