summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-10 04:28:03 +0100
committerPaul Mackerras <paulus@samba.org>2005-11-10 04:28:03 +0100
commitcbe62e2b4a764aa3f9a2b9c9004f8e86a1f0ade8 (patch)
tree7d29a29e11c30ab63953c96ae5e5fd4e91daac67 /arch/powerpc/kernel
parentpowerpc: Fixes for 32-bit powermac SMP (diff)
downloadlinux-cbe62e2b4a764aa3f9a2b9c9004f8e86a1f0ade8.tar.xz
linux-cbe62e2b4a764aa3f9a2b9c9004f8e86a1f0ade8.zip
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/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/time.c2
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)
unsigned long offset = tb_ticks_per_jiffy / max_cpus;
unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid);
+ /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */
+ previous_tb -= tb_ticks_per_jiffy;
for_each_cpu(i) {
if (i != boot_cpuid) {
previous_tb += offset;