From: Heiko Carstens Date: Tue, 14 Feb 2006 21:53:14 +0000 (-0800) Subject: [PATCH] s390: fix __delay implementation X-Git-Tag: MMI-PSA29.97-13-9~52004 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e35a6619e7be59aa38249346327c89207663bb37;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] s390: fix __delay implementation Fix __delay implementation. Called with an argument "1" or "0" it would loop nearly forever (since (1/2)-1 = 0xffffffff). Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index e96c35bddac7..71f0a2fb3078 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c @@ -30,7 +30,7 @@ void __delay(unsigned long loops) */ __asm__ __volatile__( "0: brct %0,0b" - : /* no outputs */ : "r" (loops/2) ); + : /* no outputs */ : "r" ((loops/2) + 1)); } /*