提交 e35a6619 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

[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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 5a1342f7
...@@ -30,7 +30,7 @@ void __delay(unsigned long loops) ...@@ -30,7 +30,7 @@ void __delay(unsigned long loops)
*/ */
__asm__ __volatile__( __asm__ __volatile__(
"0: brct %0,0b" "0: brct %0,0b"
: /* no outputs */ : "r" (loops/2) ); : /* no outputs */ : "r" ((loops/2) + 1));
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册