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

Next file: linux/arch/ia64/ia32/sys_ia32.c
Previous file: linux/arch/i386/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/arch/i386/lib/delay.c linux/arch/i386/lib/delay.c
@@ -13,6 +13,7 @@
 #include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/delay.h>
+#include <asm/processor.h>
 #include <asm/delay.h>
 
 #ifdef CONFIG_SMP
@@ -34,9 +35,9 @@
 	rdtscl(bclock);
 	do
 	{
+		rep_nop();
 		rdtscl(now);
-	}
-	while((now-bclock) < loops);
+	} while ((now-bclock) < loops);
 }
 
 /*
@@ -58,7 +59,7 @@
 
 void __delay(unsigned long loops)
 {
-	if(x86_udelay_tsc)
+	if (x86_udelay_tsc)
 		__rdtsc_delay(loops);
 	else
 		__loop_delay(loops);

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