]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/tsc_64.c
x86: printk kernel version in WARN_ON and other dump_stack users
[linux-2.6] / arch / x86 / kernel / tsc_64.c
index 59baecd135ab9e1f7170bf3cd6f674735e4c9031..9c70af45b42bcbe7683cf2c37b593f4da7b793ee 100644 (file)
@@ -20,7 +20,7 @@ EXPORT_SYMBOL(tsc_khz);
 
 static unsigned int cyc2ns_scale __read_mostly;
 
-void set_cyc2ns_scale(unsigned long khz)
+static inline void set_cyc2ns_scale(unsigned long khz)
 {
        cyc2ns_scale = (NSEC_PER_MSEC << NS_SCALE) / khz;
 }
@@ -73,13 +73,13 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
        struct cpufreq_freqs *freq = data;
        unsigned long *lpj, dummy;
 
-       if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC))
+       if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC))
                return 0;
 
        lpj = &dummy;
        if (!(freq->flags & CPUFREQ_CONST_LOOPS))
 #ifdef CONFIG_SMP
-               lpj = &cpu_data[freq->cpu].loops_per_jiffy;
+               lpj = &cpu_data(freq->cpu).loops_per_jiffy;
 #else
                lpj = &boot_cpu_data.loops_per_jiffy;
 #endif
@@ -206,6 +206,7 @@ void __init tsc_calibrate(void)
        }
 
        tsc_khz = tsc2 / tsc1;
+       set_cyc2ns_scale(tsc_khz);
 }
 
 /*