diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
commit | 99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch) | |
tree | 3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /include/asm-alpha/delay.h | |
parent | e73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff) |
Merge with Linux 2.3.38.
Diffstat (limited to 'include/asm-alpha/delay.h')
-rw-r--r-- | include/asm-alpha/delay.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/asm-alpha/delay.h b/include/asm-alpha/delay.h index f60e9b5a7..8db687bd4 100644 --- a/include/asm-alpha/delay.h +++ b/include/asm-alpha/delay.h @@ -9,16 +9,19 @@ * Delay routines, using a pre-computed "loops_per_second" value. */ +/* We can make the delay loop inline, but we have to be very careful wrt + scheduling for ev6 machines, so that we keep a consistent number of + iterations for all invocations. */ + extern __inline__ void __delay(unsigned long loops) { - register unsigned long r0 __asm__("$0") = loops; -#ifdef MODULE - __asm__ __volatile__("lda $28,___delay; jsr $28,($28),0" - : "=r"(r0) : "r"(r0) : "$28"); -#else - __asm__ __volatile__("bsr $28,___delay" : "=r"(r0) : "r"(r0) : "$28"); -#endif + __asm__ __volatile__( + ".align 4\n" + "1: subq %0,1,%0\n" + " bge %0,1b\n" + " nop" + : "=r" (loops) : "0"(loops)); } /* |