Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / arch / x86 / kernel / tsc_64.c
index c62f3b6eacc090e6408361a2f78eb10121cfe94a..d3bebaaad842da20ce9165083825b482333ad088 100644 (file)
@@ -92,10 +92,12 @@ sched_clock(void) __attribute__((alias("native_sched_clock")));
 
 static int tsc_unstable;
 
-inline int check_tsc_unstable(void)
+int check_tsc_unstable(void)
 {
        return tsc_unstable;
 }
+EXPORT_SYMBOL_GPL(check_tsc_unstable);
+
 #ifdef CONFIG_CPU_FREQ
 
 /* Frequency scaling support. Adjust the TSC based timer when the cpu frequency
@@ -146,9 +148,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
                        mark_tsc_unstable("cpufreq changes");
        }
 
-       preempt_disable();
-       set_cyc2ns_scale(tsc_khz_ref, smp_processor_id());
-       preempt_enable();
+       set_cyc2ns_scale(tsc_khz_ref, freq->cpu);
 
        return 0;
 }