]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/tsc_64.c
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / tsc_64.c
index 01fc9f0c39e2031e403bbf2174eaeb18d24a483c..fcc16e58609e17c42de7fae8a8309106df366423 100644 (file)
@@ -45,8 +45,8 @@ DEFINE_PER_CPU(unsigned long, cyc2ns);
 
 static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
 {
-       unsigned long flags, prev_scale, *scale;
        unsigned long long tsc_now, ns_now;
+       unsigned long flags, *scale;
 
        local_irq_save(flags);
        sched_clock_idle_sleep_event();
@@ -56,7 +56,6 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
        rdtscll(tsc_now);
        ns_now = __cycles_2_ns(tsc_now);
 
-       prev_scale = *scale;
        if (cpu_khz)
                *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;
 
@@ -149,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;
 }