Skip to content

Commit

Permalink
[PATCH] s390: fix __delay implementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Linus Torvalds committed Feb 15, 2006
1 parent 5a1342f commit e35a661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/*
Expand Down

0 comments on commit e35a661

Please sign in to comment.