clear-pkgs-linux-iot-lts2018/0999-TSC-Print-current-tsc-...

37 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Wang Chaox <chaox.m.wang@intel.com>
Date: Fri, 22 Feb 2019 15:18:23 +0800
Subject: [PATCH] TSC: Print current tsc value when detected
It's a critical KPI of system cold-boot time. This patch prints the
current tsc value which is used to align the kernel time with natural
time.
Change-Id: Id3a359d069b26f2b3b2988e7f64af5daf51e0718
Tracked-On: PKT-1761
Signed-off-by: Wang Chaox <chaox.m.wang@intel.com>
---
arch/x86/kernel/tsc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 03b7529333a6..fb57e46f4d89 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1407,9 +1407,10 @@ static bool __init determine_cpu_tsc_frequencies(bool early)
(unsigned long)cpu_khz % KHZ);
if (cpu_khz != tsc_khz) {
- pr_info("Detected %lu.%03lu MHz TSC",
+ pr_info("Detected %lu.%03lu MHz TSC, current tsc:%llu",
(unsigned long)tsc_khz / KHZ,
- (unsigned long)tsc_khz % KHZ);
+ (unsigned long)tsc_khz % KHZ,
+ rdtsc());
}
return true;
}
--
https://clearlinux.org