From 1182d8528b620c23d043bccbbef092b42062960a Mon Sep 17 00:00:00 2001 From: Zachary Amsden Date: Mon, 5 Mar 2007 00:30:36 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/timer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/asm-i386/timer.h') diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index d1f7b4f575b..12dd67bf760 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h @@ -7,6 +7,7 @@ void setup_pit_timer(void); unsigned long long native_sched_clock(void); +unsigned long native_calculate_cpu_khz(void); /* Modifiers for buggy PIT handling */ extern int pit_latch_buggy; @@ -17,6 +18,7 @@ extern int recalibrate_cpu_khz(void); #ifndef CONFIG_PARAVIRT #define get_scheduled_cycles(val) rdtscll(val) +#define calculate_cpu_khz() native_calculate_cpu_khz() #endif #endif -- cgit v1.2.3-18-g5258