patch-2.3.16 linux/include/asm-alpha/delay.h

Next file: linux/include/asm-alpha/io.h
Previous file: linux/include/asm-alpha/core_tsunami.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/include/asm-alpha/delay.h linux/include/asm-alpha/delay.h
@@ -12,9 +12,13 @@
 extern __inline__ void
 __delay(unsigned long loops)
 {
-	__asm__ __volatile__(".align 3\n"
-		"1:\tsubq %0,1,%0\n\t"
-		"bge %0,1b": "=r" (loops) : "0" (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
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)