2019-03-29 14:12:17 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-03-13 18:50:07 +08:00
|
|
|
From: Wang Chaox <chaox.m.wang@intel.com>
|
|
|
|
Date: Fri, 22 Feb 2019 15:18:23 +0800
|
2019-03-29 14:12:17 +08:00
|
|
|
Subject: [PATCH] TSC: Print current tsc value when detected
|
2019-03-13 18:50:07 +08:00
|
|
|
|
|
|
|
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
|
2020-10-27 02:14:06 +08:00
|
|
|
index 03b7529333a6..fb57e46f4d89 100644
|
2019-03-13 18:50:07 +08:00
|
|
|
--- 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;
|
|
|
|
}
|
|
|
|
--
|
2019-04-08 18:08:36 +08:00
|
|
|
https://clearlinux.org
|
2019-03-13 18:50:07 +08:00
|
|
|
|