diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2006-01-06 03:12:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:39 -0500 |
commit | bcf0f0d233fc76e7c59c7f731caad555428d0e8d (patch) | |
tree | 34b39caa375380b86eba4ddf1ab2d5928b631f13 /arch | |
parent | 3841b0a173cb6fc52163e67c03280543f2412db3 (diff) |
[PATCH] fix cpu frequency detection in arch/i386/kernel/timers/timer_tsc.c::recalibrate_cpu_khz()
When we re-calibrate the frequency, it is likely that an interrupt (as for
example the main system clock) will be triggered by the system. Therefore
the calibration may not be accurate. This will also provide a fix to bug
#5266.
Many thanks to Larry Finger for helping resolving this issue.
Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/timers/timer_tsc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index d395e3b42485..47675bbbb316 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -330,7 +330,9 @@ int recalibrate_cpu_khz(void) | |||
330 | unsigned int cpu_khz_old = cpu_khz; | 330 | unsigned int cpu_khz_old = cpu_khz; |
331 | 331 | ||
332 | if (cpu_has_tsc) { | 332 | if (cpu_has_tsc) { |
333 | local_irq_disable(); | ||
333 | init_cpu_khz(); | 334 | init_cpu_khz(); |
335 | local_irq_enable(); | ||
334 | cpu_data[0].loops_per_jiffy = | 336 | cpu_data[0].loops_per_jiffy = |
335 | cpufreq_scale(cpu_data[0].loops_per_jiffy, | 337 | cpufreq_scale(cpu_data[0].loops_per_jiffy, |
336 | cpu_khz_old, | 338 | cpu_khz_old, |