patch-2.4.0-test3 linux/include/asm-mips64/delay.h

Next file: linux/include/asm-mips64/dma.h
Previous file: linux/include/asm-mips64/bitops.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/include/asm-mips64/delay.h linux/include/asm-mips64/delay.h
@@ -1,18 +1,19 @@
-/* $Id$
- *
+/*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
  * Copyright (C) 1994 by Waldorf Electronics
- * Copyright (C) 1995 - 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1995 - 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  */
 #ifndef _ASM_DELAY_H
 #define _ASM_DELAY_H
 
 #include <linux/config.h>
 
+#include <linux/config.h>
+
 extern __inline__ void
 __delay(unsigned long loops)
 {
@@ -37,11 +38,12 @@
  */
 extern __inline__ void __udelay(unsigned long usecs, unsigned long lps)
 {
+	unsigned long lo;
+
 	usecs *= 0x000010c6f7a0b5edUL;		/* 2**64 / 1000000 */
-	__asm__("dmultu\t%0,%2\n\t"
-		"mfhi\t%0"
-		:"=r" (usecs)
-		:"0" (usecs),"r" (lps));
+	__asm__("dmultu\t%2,%3"
+		:"=h" (usecs), "=l" (lo)
+		:"r" (usecs),"r" (lps));
 	__delay(usecs);
 }
 

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