diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-09 22:28:03 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-09 22:28:03 -0500 |
commit | cbe62e2b4a764aa3f9a2b9c9004f8e86a1f0ade8 (patch) | |
tree | 7d29a29e11c30ab63953c96ae5e5fd4e91daac67 /arch | |
parent | 094fe2e712f38f49bf79ef93306c61b1b993b07b (diff) |
powerpc: Fix SMP time initialization problem
We were getting the last_jiffy per-cpu variable set ahead of the current
timebase in smp_space_timers on SMP machines. This caused the loop in
timer_interrupt to loop virtually forever, since tb_ticks_since assumes
that it will never be called with the timebase behind the last_jiffy
value.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/time.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 386006b3d616..260b6ecd26a9 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -484,6 +484,8 @@ void __init smp_space_timers(unsigned int max_cpus) | |||
484 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; | 484 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; |
485 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); | 485 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); |
486 | 486 | ||
487 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ | ||
488 | previous_tb -= tb_ticks_per_jiffy; | ||
487 | for_each_cpu(i) { | 489 | for_each_cpu(i) { |
488 | if (i != boot_cpuid) { | 490 | if (i != boot_cpuid) { |
489 | previous_tb += offset; | 491 | previous_tb += offset; |