[POWERPC] Fix wraparound problem in smp-tbsync on 32-bit
authorAdrian Cox <adrian@humboldt.co.uk>
Fri, 17 Nov 2006 14:35:48 +0000 (14:35 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 09:39:35 +0000 (20:39 +1100)
The patch below fixes an arithmetic wrap-around issue on 32bit machines
using smp-tbsync. Without this patch a timebase value over
0x000000007fffffff will hang the boot process while bringing up
secondary CPUs.

Signed-off-by: Adrian Cox <adrian@humboldt.co.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/smp-tbsync.c

index de59c6c31a5b81f1cc3f28ff12af611d4b558df5..e1970f83f14abee0bb6d18e9f4f7856d5f76ae55 100644 (file)
@@ -78,7 +78,7 @@ static int __devinit start_contest(int cmd, long offset, int num)
 {
        int i, score=0;
        u64 tb;
-       long mark;
+       u64 mark;
 
        tbsync->cmd = cmd;