aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tsc.c
diff options
context:
space:
mode:
authorAlok Kataria <akataria@vmware.com>2008-07-01 14:43:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 01:43:28 -0400
commite93ef949fd9a3f237aedfb8e64414b28980530b8 (patch)
tree4856aa8bf0e02ed1692fe7b4f545c52cdc1705a3 /arch/x86/kernel/tsc.c
parent8fbbc4b45ce3e4c0eeb15004c79c72b6896a79c2 (diff)
x86: rename paravirtualized TSC functions
Rename the paravirtualized calculate_cpu_khz to calibrate_tsc. In all cases, we actually calibrate_tsc and use that as the cpu_khz value. Signed-off-by: Alok N Kataria <akataria@vmware.com> Signed-off-by: Dan Hecht <dhecht@vmware.com> Cc: Dan Hecht <dhecht@vmware.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/tsc.c')
-rw-r--r--arch/x86/kernel/tsc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 94c16bdd5696..3c36f92160c9 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -123,9 +123,9 @@ static u64 __init tsc_read_refs(u64 *pm, u64 *hpet)
123} 123}
124 124
125/** 125/**
126 * tsc_calibrate - calibrate the tsc on boot 126 * native_calibrate_tsc - calibrate the tsc on boot
127 */ 127 */
128static unsigned int __init tsc_calibrate(void) 128unsigned long native_calibrate_tsc(void)
129{ 129{
130 unsigned long flags; 130 unsigned long flags;
131 u64 tsc1, tsc2, tr1, tr2, delta, pm1, pm2, hpet1, hpet2; 131 u64 tsc1, tsc2, tr1, tr2, delta, pm1, pm2, hpet1, hpet2;
@@ -195,10 +195,6 @@ out:
195 return tsc_khz_val; 195 return tsc_khz_val;
196} 196}
197 197
198unsigned long native_calculate_cpu_khz(void)
199{
200 return tsc_calibrate();
201}
202 198
203#ifdef CONFIG_X86_32 199#ifdef CONFIG_X86_32
204/* Only called from the Powernow K7 cpu freq driver */ 200/* Only called from the Powernow K7 cpu freq driver */
@@ -208,8 +204,8 @@ int recalibrate_cpu_khz(void)
208 unsigned long cpu_khz_old = cpu_khz; 204 unsigned long cpu_khz_old = cpu_khz;
209 205
210 if (cpu_has_tsc) { 206 if (cpu_has_tsc) {
211 cpu_khz = calculate_cpu_khz(); 207 tsc_khz = calibrate_tsc();
212 tsc_khz = cpu_khz; 208 cpu_khz = tsc_khz;
213 cpu_data(0).loops_per_jiffy = 209 cpu_data(0).loops_per_jiffy =
214 cpufreq_scale(cpu_data(0).loops_per_jiffy, 210 cpufreq_scale(cpu_data(0).loops_per_jiffy,
215 cpu_khz_old, cpu_khz); 211 cpu_khz_old, cpu_khz);
@@ -487,10 +483,10 @@ void __init tsc_init(void)
487 if (!cpu_has_tsc) 483 if (!cpu_has_tsc)
488 return; 484 return;
489 485
490 cpu_khz = calculate_cpu_khz(); 486 tsc_khz = calibrate_tsc();
491 tsc_khz = cpu_khz; 487 cpu_khz = tsc_khz;
492 488
493 if (!cpu_khz) { 489 if (!tsc_khz) {
494 mark_tsc_unstable("could not calculate TSC khz"); 490 mark_tsc_unstable("could not calculate TSC khz");
495 return; 491 return;
496 } 492 }