From: Peter Zijlstra Date: Mon, 25 Aug 2008 11:35:06 +0000 (+0200) Subject: x86: fix cpufreq + sched_clock() regression X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=52a8968ce95da8469ba0a9b3e4010fe31caf77a3;p=linux-beck.git x86: fix cpufreq + sched_clock() regression 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 --- diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 9bed5cae4bdc..8e786b0d665a 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -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; }