summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/delay.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-26 09:23:57 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-26 09:23:57 +1100
commit2a859ab07b6ab66f4134c4fffc341398bd3d328c (patch)
treec5e7eaf3bffbc18feb326940e39794328d98dc07 /arch/mips/lib/delay.c
parentcedddd812a79a4fda3885a15711aee3de78c4a24 (diff)
parente716e014384688d1a50d1aa5213ee74748c6d4e0 (diff)
downloadop-kernel-dev-2a859ab07b6ab66f4134c4fffc341398bd3d328c.zip
op-kernel-dev-2a859ab07b6ab66f4134c4fffc341398bd3d328c.tar.gz
Merge branch 'merge' into next
Merge my own merge branch to get various fixes from there and upstream, especially the hvc console tty refcouting fixes which which testing is quite a bit harder...
Diffstat (limited to 'arch/mips/lib/delay.c')
-rw-r--r--arch/mips/lib/delay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c
index 5995969..dc81ca8 100644
--- a/arch/mips/lib/delay.c
+++ b/arch/mips/lib/delay.c
@@ -15,13 +15,17 @@
#include <asm/compiler.h>
#include <asm/war.h>
-inline void __delay(unsigned int loops)
+void __delay(unsigned long loops)
{
__asm__ __volatile__ (
" .set noreorder \n"
" .align 3 \n"
"1: bnez %0, 1b \n"
+#if __SIZEOF_LONG__ == 4
" subu %0, 1 \n"
+#else
+ " dsubu %0, 1 \n"
+#endif
" .set reorder \n"
: "=r" (loops)
: "0" (loops));
OpenPOWER on IntegriCloud