]> git.hungrycats.org Git - linux/commitdiff
[PATCH] monolitic_clock, timer_{tsc,hpet} and CPUFREQ
authorAndrew Morton <akpm@osdl.org>
Tue, 9 Sep 2003 17:18:46 +0000 (10:18 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 17:18:46 +0000 (10:18 -0700)
From: Dmitry Torokhov <dtor_core@ameritech.net>

I noticed that although timer_tsc registers cpufreq notifier to detect
frequency changes and adjust cpu_khz it does not set cyc2ns_scale.

arch/i386/kernel/timers/timer_tsc.c

index f045ff34bdf890e1940d7be260b84e80028afcee..1a96686f92d4a96737a21a62faf3b5799d297051 100644 (file)
@@ -312,6 +312,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
                if (use_tsc) {
                        fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq);
                        cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
+                       set_cyc2ns_scale(cpu_khz/1000);
                }
 #endif
        }