lkml.org 
[lkml]   [2009]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH: x86] Print the hypervisor returned tsc_khz during boot.
From
Date
On an AMD-64 system the processor frequency that is printed during
system boot, may be different than the tsc frequency that was returned
by the hypervisor, due to value returned from calibrate_cpu. For
debugging timekeeping or other related issues it might be better to get
the tsc_khz value returned by the hypervisor.

The patch below now prints the tsc frequency that the hypervisor
returned. Please consider for tip.

--
Signed-off-by: Alok N Kataria <akataria@vmware.com>

Index: linux-tip-master/arch/x86/kernel/tsc.c
===================================================================
--- linux-tip-master.orig/arch/x86/kernel/tsc.c 2009-08-23 17:53:44.000000000 -0700
+++ linux-tip-master/arch/x86/kernel/tsc.c 2009-08-23 17:55:08.000000000 -0700
@@ -405,7 +405,10 @@ unsigned long native_calibrate_tsc(void)

hv_tsc_khz = get_hypervisor_tsc_freq();
if (hv_tsc_khz) {
- printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
+ printk(KERN_INFO "TSC: Frequency read from the hypervisor : "
+ "%lu.%03lu MHz\n",
+ (unsigned long) hv_tsc_khz / 1000,
+ (unsigned long) hv_tsc_khz % 1000);
return hv_tsc_khz;
}







\
 
 \ /
  Last update: 2009-08-24 03:11    [W:0.383 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site