patch-2.4.1 linux/arch/sh/lib/delay.c

Next file: linux/arch/sh/mm/cache.c
Previous file: linux/arch/sh/lib/checksum.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/arch/sh/lib/delay.c linux/arch/sh/lib/delay.c
@@ -21,7 +21,11 @@
 
 inline void __const_udelay(unsigned long xloops)
 {
-	xloops *= current_cpu_data.loops_per_jiffy;
+	__asm__("dmulu.l	%0, %2\n\t"
+		"sts	mach, %0"
+		: "=r" (xloops)
+		: "0" (xloops), "r" (current_cpu_data.loops_per_jiffy)
+		: "macl", "mach");
 	__delay(xloops * HZ);
 }
 

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