From: Adrian Cox Date: Fri, 17 Nov 2006 14:35:48 +0000 (+0000) Subject: [POWERPC] Fix wraparound problem in smp-tbsync on 32-bit X-Git-Tag: v2.6.20-rc2~6^2~13^2~13^2~98 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9a06c3b176976919e223844f8ed9f1acae20b433;p=linux-2.6-omap-h63xx.git [POWERPC] Fix wraparound problem in smp-tbsync on 32-bit 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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c index de59c6c31a5..e1970f83f14 100644 --- a/arch/powerpc/kernel/smp-tbsync.c +++ b/arch/powerpc/kernel/smp-tbsync.c @@ -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;