patch-2.4.21 linux-2.4.21/include/asm-sparc64/delay.h
Next file: linux-2.4.21/include/asm-sparc64/elf.h
Previous file: linux-2.4.21/include/asm-sparc64/auxio.h
Back to the patch index
Back to the overall index
-  Lines: 28
-  Date:
2003-06-13 07:51:38.000000000 -0700
-  Orig file: 
linux-2.4.20/include/asm-sparc64/delay.h
-  Orig date: 
2002-02-25 11:38:13.000000000 -0800
diff -urN linux-2.4.20/include/asm-sparc64/delay.h linux-2.4.21/include/asm-sparc64/delay.h
@@ -45,6 +45,19 @@
 	__delay(usecs * HZ);
 }
 
+extern __inline__ void __ndelay(unsigned long usecs, unsigned long lps)
+{
+	usecs *= 0x0000000000000005UL;		/* 2**32 / 10000 */
+
+	__asm__ __volatile__(
+"	mulx	%1, %2, %0\n"
+"	srlx	%0, 32, %0\n"
+	: "=r" (usecs)
+	: "r" (usecs), "r" (lps));
+
+	__delay(usecs * HZ);
+}
+
 #ifdef CONFIG_SMP
 #define __udelay_val cpu_data[smp_processor_id()].udelay_val
 #else
@@ -52,6 +65,7 @@
 #endif
 
 #define udelay(usecs) __udelay((usecs),__udelay_val)
+#define ndelay(usecs) __ndelay((usecs),__udelay_val)
 
 #endif /* !__ASSEMBLY__ */
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)