aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/tsc.c
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2007-03-05 03:30:36 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-05 10:57:52 -0500
commit1182d8528b620c23d043bccbbef092b42062960a (patch)
tree3df690a1a731811f8fecda06cb785a5a7b06d4d0 /arch/i386/kernel/tsc.c
parent6cb9a8350aee789100a365794272ed20cc8f2401 (diff)
[PATCH] vmi: cpu cycles fix
In order to share the common code in tsc.c which does CPU Khz calibration, we need to make an accurate value of CPU speed available to the tsc.c code. This value loses a lot of precision in a VM because of the timing differences with real hardware, but we need it to be as precise as possible so the guest can make accurate time calculations with the cycle counters. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/tsc.c')
-rw-r--r--arch/i386/kernel/tsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index c9c9d54c91f6..59222a04234b 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -117,7 +117,7 @@ unsigned long long sched_clock(void)
117 return cycles_2_ns(this_offset); 117 return cycles_2_ns(this_offset);
118} 118}
119 119
120static unsigned long calculate_cpu_khz(void) 120unsigned long native_calculate_cpu_khz(void)
121{ 121{
122 unsigned long long start, end; 122 unsigned long long start, end;
123 unsigned long count; 123 unsigned long count;