Messages in this thread Patch in this message | | | From | 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 |
| |
From: Len Brown <len.brown@intel.com>
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 <len.brown@intel.com> --- 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
| |