patch-2.2.14 linux/include/asm-alpha/delay.h
Next file: linux/include/asm-alpha/dma.h
Previous file: linux/include/asm-alpha/core_pyxis.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Tue Jan 4 10:12:24 2000
- Orig file:
v2.2.13/linux/include/asm-alpha/delay.h
- Orig date:
Tue Dec 29 13:56:15 1998
diff -u --recursive --new-file v2.2.13/linux/include/asm-alpha/delay.h linux/include/asm-alpha/delay.h
@@ -9,12 +9,18 @@
* 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, to keep it consistent for all locations
+ * of invocations. This is a reasonable compromise.
+ */
+
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));
+ __asm__ __volatile__(".align 4\n"
+ "1:\tsubq %0,1,%0\n\t"
+ "bge %0,1b\n\t"
+ "nop": "=r" (loops) : "0" (loops));
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)