From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbdLVF2O (ORCPT ); Fri, 22 Dec 2017 00:28:14 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:44960 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbdLVF2F (ORCPT ); Fri, 22 Dec 2017 00:28:05 -0500 X-Google-Smtp-Source: ACJfBot5czRYDhy6lEaZErHCONMQdW67zHBd6HoHQpkpIOER1Pe/FA9dZm7na+4ehE6DUyOi8pdPvw== From: Len Brown To: x86@kernel.org Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH 3/3] x86/tsc: Print tsc_khz, when it differs from cpu_khz Date: Fri, 22 Dec 2017 00:27:56 -0500 Message-Id: <537b342debcd8e8aebc8d631015dcdf9f9ba8a26.1513920414.git.len.brown@intel.com> X-Mailer: git-send-email 2.14.0-rc0 In-Reply-To: <0fe2503aa7d7fc69137141fc705541a78101d2b9.1513920414.git.len.brown@intel.com> References: <0fe2503aa7d7fc69137141fc705541a78101d2b9.1513920414.git.len.brown@intel.com> In-Reply-To: <0fe2503aa7d7fc69137141fc705541a78101d2b9.1513920414.git.len.brown@intel.com> References: <0fe2503aa7d7fc69137141fc705541a78101d2b9.1513920414.git.len.brown@intel.com> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Len Brown When Linux detects the CPU and TSC rate are the same tsc: Detected 2900.000 MHz processor tells us both. But if Linux detects a TSC rate that differs from the CPU rate, print that also: tsc: Detected 2904.000 MHz TSC Signed-off-by: Len Brown --- arch/x86/kernel/tsc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 3bf4df7f52d7..6077ef5354d5 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -1316,6 +1316,11 @@ 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); -- 2.14.0-rc0