]> err.no Git - linux-2.6/commitdiff
[PATCH] s390: fix __delay implementation
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 14 Feb 2006 21:53:14 +0000 (13:53 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 15 Feb 2006 00:09:35 +0000 (16:09 -0800)
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/lib/delay.c

index e96c35bddac778030a7de4c184e4d781248a0fe4..71f0a2fb30786674b601391b3d4ffca1d604256b 100644 (file)
@@ -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));
 }
 
 /*