diff options
-rw-r--r-- | arch/x86/kernel/tsc_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/tsc_64.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index f14cfd9d1f94..c2241e04ea5f 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c | |||
@@ -256,9 +256,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) | |||
256 | ref_freq, freq->new); | 256 | ref_freq, freq->new); |
257 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) { | 257 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) { |
258 | tsc_khz = cpu_khz; | 258 | tsc_khz = cpu_khz; |
259 | preempt_disable(); | 259 | set_cyc2ns_scale(cpu_khz, freq->cpu); |
260 | set_cyc2ns_scale(cpu_khz, smp_processor_id()); | ||
261 | preempt_enable(); | ||
262 | /* | 260 | /* |
263 | * TSC based sched_clock turns | 261 | * TSC based sched_clock turns |
264 | * to junk w/ cpufreq | 262 | * to junk w/ cpufreq |
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c index 947554ddabb6..d3bebaaad842 100644 --- a/arch/x86/kernel/tsc_64.c +++ b/arch/x86/kernel/tsc_64.c | |||
@@ -148,9 +148,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
148 | mark_tsc_unstable("cpufreq changes"); | 148 | mark_tsc_unstable("cpufreq changes"); |
149 | } | 149 | } |
150 | 150 | ||
151 | preempt_disable(); | 151 | set_cyc2ns_scale(tsc_khz_ref, freq->cpu); |
152 | set_cyc2ns_scale(tsc_khz_ref, smp_processor_id()); | ||
153 | preempt_enable(); | ||
154 | 152 | ||
155 | return 0; | 153 | return 0; |
156 | } | 154 | } |