patch-2.4.21 linux-2.4.21/arch/i386/lib/delay.c

Next file: linux-2.4.21/arch/i386/lib/usercopy.c
Previous file: linux-2.4.21/arch/i386/kernel/time.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/i386/lib/delay.c linux-2.4.21/arch/i386/lib/delay.c
@@ -56,10 +56,13 @@
 		:"=&a" (d0)
 		:"0" (loops));
 }
-
+extern void __cyclone_delay(unsigned long loops);
+extern int use_cyclone;
 void __delay(unsigned long loops)
 {
-	if (x86_udelay_tsc)
+	if (use_cyclone)
+		__cyclone_delay(loops);
+	else if (x86_udelay_tsc)
 		__rdtsc_delay(loops);
 	else
 		__loop_delay(loops);
@@ -78,3 +81,8 @@
 {
 	__const_udelay(usecs * 0x000010c6);  /* 2**32 / 1000000 */
 }
+
+void __ndelay(unsigned long nsecs)
+{
+	__const_udelay(nsecs * 0x00005);  /* 2**32 / 1000000000 (rounded up) */
+}

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