summaryrefslogtreecommitdiff
path: root/include/asm-mips/delay.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 19:08:33 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 19:08:33 -0800
commit2d80cb2a5e022225b9512ccc98f7979cc4b92ce8 (patch)
treea7f247ba424b5366ce443b3d9cb5b4c7f6538e3f /include/asm-mips/delay.h
parent75b566af5cc6f64f9ab5b66608ff8ce18098a2b4 (diff)
v2.4.5.8 -> v2.4.5.9
- make sure "sync()" doesn't effectively lock up the machine by overloading all the IO resources - fix up some network memory allocations that don't wan tto wait on IO. - merge with Alan (including MIPS update) - Jeff Garzik: network driver updates. - Al Viro: System V FS update (write capability, page cache, mondo cleanups) - Kai Germaschewski: ISDN cleanups, TURBOPAM driver by Stelian Pop - Ben Fennema: UDF update (time handling, i_blocks fix) - Neil Brown: md error handling improvements, knfsd file handle compatibility - Paul Mackerras: PPC update - Jakub Jelinek: fix up kernel linker scripts to accept .rodata better - Patrick Mochel: fix PME handling in pci_enable_wake() - Chris Mason: reiserfs PF_MEMALLOC handling
Diffstat (limited to 'include/asm-mips/delay.h')
-rw-r--r--include/asm-mips/delay.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h
index 7628fe4a8cdb..50024e3481c1 100644
--- a/include/asm-mips/delay.h
+++ b/include/asm-mips/delay.h
@@ -1,17 +1,18 @@
-/* $Id: delay.h,v 1.2 1999/01/04 16:09:20 ralf Exp $
- *
+/*
* 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 - 1998 by Ralf Baechle
+ * Copyright (C) 1995 - 1998, 2001 by Ralf Baechle
*/
#ifndef _ASM_DELAY_H
#define _ASM_DELAY_H
#include <linux/config.h>
+extern unsigned long loops_per_jiffy;
+
extern __inline__ void
__delay(unsigned long loops)
{
@@ -34,21 +35,21 @@ __delay(unsigned long loops)
* first constant multiplications gets optimized away if the delay is
* a constant)
*/
-extern __inline__ void __udelay(unsigned long usecs, unsigned long lps)
+extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj)
{
unsigned long lo;
- usecs *= 0x000010c6; /* 2**32 / 1000000 */
+ usecs *= 0x00068db8; /* 2**32 / (1000000 / HZ) */
__asm__("multu\t%2,%3"
:"=h" (usecs), "=l" (lo)
- :"r" (usecs),"r" (lps));
+ :"r" (usecs),"r" (lpj));
__delay(usecs);
}
#ifdef CONFIG_SMP
#define __udelay_val cpu_data[smp_processor_id()].udelay_val
#else
-#define __udelay_val loops_per_sec
+#define __udelay_val loops_per_jiffy
#endif
#define udelay(usecs) __udelay((usecs),__udelay_val)