patch-2.4.21 linux-2.4.21/include/asm-ia64/delay.h

Next file: linux-2.4.21/include/asm-ia64/hdreg.h
Previous file: linux-2.4.21/include/asm-ia64/bitops.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-ia64/delay.h linux-2.4.21/include/asm-ia64/delay.h
@@ -82,4 +82,14 @@
 		/* skip */;
 }
 
+static __inline__ void
+ndelay (unsigned long nsecs)
+{
+	unsigned long start = ia64_get_itc();
+	unsigned long cycles = nsecs*local_cpu_data->cyc_per_usec/1000;
+
+	while (ia64_get_itc() - start < cycles)
+		/* skip */;
+}
+
 #endif /* _ASM_IA64_DELAY_H */

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