]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix cpufreq + sched_clock() regression
authorPeter Zijlstra <peterz@infradead.org>
Mon, 25 Aug 2008 11:35:06 +0000 (13:35 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 25 Aug 2008 12:39:19 +0000 (14:39 +0200)
I noticed that my sched_clock() was slow on a number of machine, so I
started looking at cpufreq.

The below seems to fix the problem for me.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/tsc.c

index 9bed5cae4bdcc31671c36b09393d854ac3327b14..8e786b0d665a42e1f24dc7a068ec21fa0a654eeb 100644 (file)
@@ -314,7 +314,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
                        mark_tsc_unstable("cpufreq changes");
        }
 
-       set_cyc2ns_scale(tsc_khz_ref, freq->cpu);
+       set_cyc2ns_scale(tsc_khz, freq->cpu);
 
        return 0;
 }