## Automatically generated incremental diff
## From:   linux-2.2.18-pre12
## To:     linux-2.2.18-pre13
## Robot:  $Id: make-incremental-diff,v 1.5 2001/12/01 08:32:36 hpa Exp $

diff -urN linux-2.2.18-pre12/CREDITS linux/CREDITS
--- linux-2.2.18-pre12/CREDITS	Mon Dec  3 20:29:58 2001
+++ linux/CREDITS	Mon Dec  3 20:30:39 2001
@@ -46,6 +46,10 @@
 P: 1024/85AD9EED AD C0 49 08 91 67 DF D7  FA 04 1A EE 09 E8 44 B0
 D: Unix98 pty support.
 D: APM update to 1.2 spec.
+D: /devfs hacking.
+S: 322 N. Riverside Dr.
+S: Neptune, NJ 07753
+S: USA
 
 N: Erik Andersen
 E: andersee@debian.org
@@ -727,6 +731,7 @@
 D: parent process death signal to children
 D: prctl() syscall
 D: /proc/mtrr support to manipulate MTRRs on Intel P6 family
+D: Device FileSystem (devfs)
 S: CSIRO Australia Telescope National Facility
 S: P.O. Box 76, Epping
 S: New South Wales, 2121
@@ -1173,6 +1178,10 @@
 S: Markham, Ontario
 S: L3R 8B2
 S: Canada
+
+N: Andrzej M. Krzysztofowicz
+E: ankry@mif.pg.gda.pl
+D: Some 8-bit XT disk driver and /devfs hacking 
 
 N: Greg Kroah-Hartman
 E: greg@kroah.com
diff -urN linux-2.2.18-pre12/MAINTAINERS linux/MAINTAINERS
--- linux-2.2.18-pre12/MAINTAINERS	Mon Dec  3 20:29:58 2001
+++ linux/MAINTAINERS	Mon Dec  3 20:30:39 2001
@@ -267,6 +267,12 @@
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
+DEVICE FILESYSTEM
+P:	Richard Gooch
+M:	rgooch@atnf.csiro.au
+L:	linux-kernel@vger.rutgers.edu
+S:	Maintained
+
 DIGI INTL. EPCA DRIVER
 P:      Daniel Taylor
 M:      support@digi.com
diff -urN linux-2.2.18-pre12/Makefile linux/Makefile
--- linux-2.2.18-pre12/Makefile	Mon Dec  3 20:29:58 2001
+++ linux/Makefile	Mon Dec  3 20:30:39 2001
@@ -1,14 +1,14 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre12
+EXTRAVERSION = pre13
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
 .EXPORT_ALL_VARIABLES:
 
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
-	  else if [ -x /bin/bash ]; then echo /bin/bash; \
+	  else if [ -x /bin/bash ]; then echo /bin/bash2; \
 	  else echo sh; fi ; fi)
 TOPDIR	:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
 
@@ -22,9 +22,10 @@
 
 AS	=$(CROSS_COMPILE)as
 LD	=$(CROSS_COMPILE)ld
-CC	=$(CROSS_COMPILE)$(shell if [ -n "`which gcc272 2>/dev/null`" ]; then echo "`which gcc272`";\
-	else  if [ -n "`which kgcc 2>/dev/null`" ]; then echo "`which kgcc`"; else\
-	echo "cc"; fi ; fi)  -D__KERNEL__ -I$(HPATH) 
+CC	=$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)cc; else \
+	which gcc272 2>/dev/null || which kgcc 2>/dev/null || echo cc; fi) \
+	-D__KERNEL__ -I$(HPATH)
+#CC	=$(CROSS_COMPILE)cc -D__KERNEL__ -I$(HPATH)
 CPP	=$(CC) -E
 AR	=$(CROSS_COMPILE)ar
 NM	=$(CROSS_COMPILE)nm
diff -urN linux-2.2.18-pre12/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux-2.2.18-pre12/arch/i386/kernel/setup.c	Mon Dec  3 20:29:59 2001
+++ linux/arch/i386/kernel/setup.c	Mon Dec  3 20:30:39 2001
@@ -914,7 +914,7 @@
 	char *p = NULL;
 	extern void mcheck_init(void);
 
-	c->loops_per_sec = loops_per_sec;
+	c->loops_per_jiffy = loops_per_jiffy;
 	c->x86_cache_size = -1;
 
 	get_cpu_vendor(c);
@@ -1257,8 +1257,8 @@
 			if ( c->x86_capability & (1 << i) )
 				p += sprintf(p, " %s", x86_cap_flags[i]);
 		p += sprintf(p, "\nbogomips\t: %lu.%02lu\n\n",
-			     (c->loops_per_sec+2500)/500000,
-			     ((c->loops_per_sec+2500)/5000) % 100);
+			     (c->loops_per_jiffy+2500)/(500000/HZ),
+			     ((c->loops_per_jiffy+2500)/(5000/HZ)) % 100);
 	}
 	return p - buffer;
 }
diff -urN linux-2.2.18-pre12/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux-2.2.18-pre12/arch/i386/kernel/smp.c	Mon Dec  3 20:29:59 2001
+++ linux/arch/i386/kernel/smp.c	Mon Dec  3 20:30:39 2001
@@ -1596,12 +1596,12 @@
 		for(i=0;i<32;i++)
 		{
 			if (cpu_online_map&(1<<i))
-				bogosum+=cpu_data[i].loops_per_sec;
+				bogosum+=cpu_data[i].loops_per_jiffy;
 		}
 		printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
 			cpucount+1,
-			(bogosum+2500)/500000,
-			((bogosum+2500)/5000)%100);
+			(bogosum+2500)/(500000/HZ),
+			((bogosum+2500)/(5000/HZ))%100);
 		SMP_PRINTK(("Before bogocount - setting activated=1.\n"));
 		smp_activated=1;
 		smp_num_cpus=cpucount+1;
@@ -1853,7 +1853,7 @@
 		 * guessed from the TSC calibration.
 		 */
 
-		stuck = 50000000 + cpu_data[cpu].loops_per_sec/2;
+		stuck = 50000000 + cpu_data[cpu].loops_per_jiffy*(HZ/2);
 		while (smp_invalidate_needed) {
 			/*
 			 * Take care of "crossing" invalidates
diff -urN linux-2.2.18-pre12/arch/i386/lib/delay.c linux/arch/i386/lib/delay.c
--- linux-2.2.18-pre12/arch/i386/lib/delay.c	Wed May  3 17:16:31 2000
+++ linux/arch/i386/lib/delay.c	Mon Dec  3 20:30:39 2001
@@ -22,8 +22,7 @@
 	
 /*
  *	Do a udelay using the TSC for any CPU that happens
- *	to have one that we trust. This could be optimised to avoid
- *	the multiply per loop but its a delay loop so who are we kidding...
+ *	to have one that we trust.
  */
 
 static void __rdtsc_delay(unsigned long loops)
@@ -63,13 +62,19 @@
 		__loop_delay(loops);
 }
 
+/*
+ *	This could be optimised to avoid the multiply per loop but its a
+ *	delay loop so who are we kidding...  (we'd run into nasty 32-bit
+ *	issues with delays > 10 ms or HZ > 100 that way)
+ */
+
 void __const_udelay(unsigned long xloops)
 {
 	int d0;
 	__asm__("mull %0"
 		:"=d" (xloops), "=&a" (d0)
-		:"1" (xloops),"0" (current_cpu_data.loops_per_sec));
-        __delay(xloops);
+		:"1" (xloops),"0" (current_cpu_data.loops_per_jiffy));
+        __delay(xloops * HZ);
 }
 
 /*
diff -urN linux-2.2.18-pre12/drivers/char/Makefile linux/drivers/char/Makefile
--- linux-2.2.18-pre12/drivers/char/Makefile	Mon Dec  3 20:30:07 2001
+++ linux/drivers/char/Makefile	Mon Dec  3 20:30:39 2001
@@ -203,7 +203,7 @@
 obj-$(CONFIG_SX) += sx.o generic_serial.o
 
 ifeq ($(CONFIG_RIO),y)
-L_OBJS += rio/rio.o generic_serial.o
+O_OBJS += rio/rio.o generic_serial.o
 SUB_DIRS += rio
 MOD_SUB_DIRS += rio
 else
diff -urN linux-2.2.18-pre12/drivers/char/dtlk.c linux/drivers/char/dtlk.c
--- linux-2.2.18-pre12/drivers/char/dtlk.c	Mon Sep  4 10:39:17 2000
+++ linux/drivers/char/dtlk.c	Mon Dec  3 20:30:39 2001
@@ -154,7 +154,7 @@
 	if (minor != DTLK_MINOR || !dtlk_has_indexing)
 		return -EINVAL;
 
-	for (retries = 0; retries < loops_per_sec / 10; retries++) {
+	for (retries = 0; retries < 10000000; retries++) {
 		while (i < count && dtlk_readable()) {
 			ch = dtlk_read_lpc();
 			/*        printk("dtlk_read() reads 0x%02x\n", ch); */
@@ -168,7 +168,7 @@
 			break;
 		dtlk_delay(10);
 	}
-	if (retries == loops_per_sec)
+	if (retries == 10000000)
 		printk(KERN_ERR "dtlk_read times out\n");
 	TRACE_RET;
 	return -EAGAIN;
@@ -222,7 +222,7 @@
 				   up to 250 usec for the RDY bit to
 				   go nonzero. */
 				for (retries = 0;
-				     retries < loops_per_sec / 4000;
+				     retries < 25000;
 				     retries++)
 					if (inb_p(dtlk_port_tts) &
 					    TTS_WRITABLE)
@@ -479,7 +479,7 @@
 for (i = 0; i < 10; i++)			\
   {						\
     buffer[b++] = inb_p(dtlk_port_lpc);		\
-    __delay(loops_per_sec/1000000);             \
+    udelay(1);					\
   }
 				char buffer[1000];
 				int b = 0, i, j;
@@ -490,7 +490,7 @@
 				LOOK
 				    dtlk_write_bytes("\0012I\r", 4);
 				buffer[b++] = 0;
-				__delay(50 * loops_per_sec / 1000);
+				mdelay(50);
 				outb_p(0xff, dtlk_port_lpc);
 				buffer[b++] = 0;
 				LOOK
@@ -509,12 +509,12 @@
 for (i = 0; i < 10; i++)			\
   {						\
     buffer[b++] = inb_p(dtlk_port_tts);		\
-    __delay(loops_per_sec/1000000);  /* 1 us */ \
+    udelay(1);					\
   }
 				char buffer[1000];
 				int b = 0, i, j;
 
-				__delay(loops_per_sec / 100);	/* 10 ms */
+				mdelay(10);
 				LOOK
 				    outb_p(0x03, dtlk_port_tts);
 				buffer[b++] = 0;
@@ -646,7 +646,7 @@
 	/* acknowledging a read takes 3-4
 	   usec.  Here, we wait up to 20 usec
 	   for the acknowledgement */
-	retries = (loops_per_sec * 20) / 1000000;
+	retries = 2000;
 	while (inb_p(dtlk_port_lpc) != 0x7f && --retries > 0);
 	if (retries == 0)
 		printk(KERN_ERR "dtlk_read_lpc() timeout\n");
@@ -704,7 +704,7 @@
 	/* the RDY bit goes zero 2-3 usec after writing, and goes
 	   1 again 180-190 usec later.  Here, we wait up to 10
 	   usec for the RDY bit to go zero. */
-	for (retries = 0; retries < loops_per_sec / 100000; retries++)
+	for (retries = 0; retries < 1000; retries++)
 		if ((inb_p(dtlk_port_tts) & TTS_WRITABLE) == 0)
 			break;
 
diff -urN linux-2.2.18-pre12/drivers/char/epca.c linux/drivers/char/epca.c
--- linux-2.2.18-pre12/drivers/char/epca.c	Mon Sep  4 10:39:17 2000
+++ linux/drivers/char/epca.c	Mon Dec  3 20:30:39 2001
@@ -1681,7 +1681,7 @@
 		memory.
 	------------------------------------------------------------------*/
 
-	ulong flags, save_loops_per_sec; 
+	ulong flags;
 	int crd;
 	struct board_info *bd;
 	unsigned char board_id = 0;
@@ -1825,9 +1825,10 @@
 	/* --------------------------------------------------------------------- 
 	   loops_per_sec hasn't been set at this point :-(, so fake it out... 
 	   I set it, so that I can use the __delay() function.
+	    
+	   Yes it is nowdays
+	   
 	------------------------------------------------------------------------ */
-	save_loops_per_sec = loops_per_sec;
-	loops_per_sec = 13L * 500000L;
 
 	save_flags(flags);
 	cli();
@@ -1960,7 +1961,6 @@
 	if (tty_register_driver(&pc_info))
 		panic("Couldn't register Digi PC/ info ");
 
-	loops_per_sec = save_loops_per_sec;  /* reset it to what it should be */
 
 	/* -------------------------------------------------------------------
 	   Start up the poller to check for events on all enabled boards
diff -urN linux-2.2.18-pre12/drivers/isdn/avmb1/avmcard.h linux/drivers/isdn/avmb1/avmcard.h
--- linux-2.2.18-pre12/drivers/isdn/avmb1/avmcard.h	Wed May  3 17:16:39 2000
+++ linux/drivers/isdn/avmb1/avmcard.h	Mon Dec  3 20:30:39 2001
@@ -347,13 +347,13 @@
 static inline void b1_reset(unsigned int base)
 {
 	b1outp(base, B1_RESET, 0);
-	udelay(55 * 2 * 1000);	/* 2 TIC's */
+	mdelay(55 * 2);	/* 2 TIC's */
 
 	b1outp(base, B1_RESET, 1);
-	udelay(55 * 2 * 1000);	/* 2 TIC's */
+	mdelay(55 * 2);	/* 2 TIC's */
 
 	b1outp(base, B1_RESET, 0);
-	udelay(55 * 2 * 1000);	/* 2 TIC's */
+	mdelay(55 * 2);	/* 2 TIC's */
 }
 
 static inline unsigned char b1_disable_irq(unsigned int base)
diff -urN linux-2.2.18-pre12/drivers/isdn/avmb1/b1dma.c linux/drivers/isdn/avmb1/b1dma.c
--- linux-2.2.18-pre12/drivers/isdn/avmb1/b1dma.c	Mon Sep  4 10:39:18 2000
+++ linux/drivers/isdn/avmb1/b1dma.c	Mon Dec  3 20:30:39 2001
@@ -230,14 +230,14 @@
 	restore_flags(flags);
 
 	b1dmaoutmeml(card->mbase+AMCC_MCSR, 0);
-	udelay(10 * 1000);
+	mdelay(10);
 	b1dmaoutmeml(card->mbase+AMCC_MCSR, 0x0f000000); /* reset all */
-	udelay(10 * 1000);
+	mdelay(10);
 	b1dmaoutmeml(card->mbase+AMCC_MCSR, 0);
 	if (card->cardtype == avm_t1pci)
-		udelay(42 * 1000);
+		mdelay(42);
 	else
-		udelay(10 * 1000);
+		mdelay(10);
 }
 
 /* ------------------------------------------------------------- */
@@ -245,11 +245,11 @@
 int b1dma_detect(avmcard *card)
 {
 	b1dmaoutmeml(card->mbase+AMCC_MCSR, 0);
-	udelay(10 * 1000);
+	mdelay(10);
 	b1dmaoutmeml(card->mbase+AMCC_MCSR, 0x0f000000); /* reset all */
-	udelay(10 * 1000);
+	mdelay(10);
 	b1dmaoutmeml(card->mbase+AMCC_MCSR, 0);
-	udelay(42 * 1000);
+	mdelay(42);
 
 	b1dmaoutmeml(card->mbase+AMCC_RXLEN, 0);
 	b1dmaoutmeml(card->mbase+AMCC_TXLEN, 0);
diff -urN linux-2.2.18-pre12/drivers/isdn/avmb1/c4.c linux/drivers/isdn/avmb1/c4.c
--- linux-2.2.18-pre12/drivers/isdn/avmb1/c4.c	Mon Sep  4 10:39:18 2000
+++ linux/drivers/isdn/avmb1/c4.c	Mon Dec  3 20:30:39 2001
@@ -373,7 +373,7 @@
 		return 8;
 	if (c4_poke(card, DC21285_ARMCSR_BASE+DRAM_TIMING, 0)) return 9;
 
-        udelay(1000);
+        mdelay(1);
 
 	if (c4_peek(card, DC21285_DRAM_A0MR, &dummy)) return 10;
 	if (c4_peek(card, DC21285_DRAM_A1MR, &dummy)) return 11;
@@ -385,7 +385,7 @@
 	if (c4_poke(card, DC21285_DRAM_A2MR+CAS_OFFSET, 0)) return 16;
 	if (c4_poke(card, DC21285_DRAM_A3MR+CAS_OFFSET, 0)) return 17;
 
-        udelay(1000);
+        mdelay(1);
 
 	if (c4_poke(card, DC21285_ARMCSR_BASE+DRAM_TIMING, DRAM_TIMING_DEF))
 		return 18;
@@ -863,7 +863,7 @@
 	c4outmeml(card->mbase+MBOX_UP_LEN, 0);
 	c4outmeml(card->mbase+MBOX_DOWN_LEN, 0);
 	c4outmeml(card->mbase+DOORBELL, DBELL_INIT);
-	udelay(1000);
+	mdelay(1);
 	c4outmeml(card->mbase+DOORBELL,
 			DBELL_UP_HOST | DBELL_DOWN_HOST | DBELL_RESET_HOST);
 
diff -urN linux-2.2.18-pre12/drivers/isdn/avmb1/t1isa.c linux/drivers/isdn/avmb1/t1isa.c
--- linux-2.2.18-pre12/drivers/isdn/avmb1/t1isa.c	Mon Sep  4 10:39:18 2000
+++ linux/drivers/isdn/avmb1/t1isa.c	Mon Dec  3 20:30:39 2001
@@ -135,7 +135,7 @@
 	cli();
 	/* board reset */
 	t1outp(base, T1_RESETBOARD, 0xf);
-	udelay(100 * 1000);
+	mdelay(100);
 	dummy = t1inp(base, T1_FASTLINK+T1_OUTSTAT); /* first read */
 
 	/* write config */
@@ -147,18 +147,18 @@
 	t1outp(base, ((base >> 4)) & 0x3, cregs[7]);
 	restore_flags(flags);
 
-	udelay(100 * 1000);
+	mdelay(100);
 	t1outp(base, T1_FASTLINK+T1_RESETLINK, 0);
 	t1outp(base, T1_SLOWLINK+T1_RESETLINK, 0);
-	udelay(10 * 1000);
+	mdelay(10);
 	t1outp(base, T1_FASTLINK+T1_RESETLINK, 1);
 	t1outp(base, T1_SLOWLINK+T1_RESETLINK, 1);
-	udelay(100 * 1000);
+	mdelay(100);
 	t1outp(base, T1_FASTLINK+T1_RESETLINK, 0);
 	t1outp(base, T1_SLOWLINK+T1_RESETLINK, 0);
-	udelay(10 * 1000);
+	mdelay(10);
 	t1outp(base, T1_FASTLINK+T1_ANALYSE, 0);
-	udelay(5 * 1000);
+	mdelay(5);
 	t1outp(base, T1_SLOWLINK+T1_ANALYSE, 0);
 
 	if (t1inp(base, T1_FASTLINK+T1_OUTSTAT) != 0x1) /* tx empty */
diff -urN linux-2.2.18-pre12/drivers/net/3c523.c linux/drivers/net/3c523.c
--- linux-2.2.18-pre12/drivers/net/3c523.c	Sat Apr 24 17:49:37 1999
+++ linux/drivers/net/3c523.c	Mon Dec  3 20:30:40 2001
@@ -161,15 +161,10 @@
 
 /**************************************************************************/
 
-#define DELAY(x) {int i=jiffies; \
-                  if(loops_per_sec == 1) \
-                     while(time_after(i+(x), jiffies)); \
-                  else \
-                     __delay((loops_per_sec>>5)*x); \
-                 }
+#define DELAY(x) { mdelay(32 * x); }
 
 /* a much shorter delay: */
-#define DELAY_16(); { __delay( (loops_per_sec>>16)+1 ); }
+#define DELAY_16(); { udelay(16) ; }
 
 /* wait for command with timeout: */
 #define WAIT_4_SCB_CMD() { int i; \
diff -urN linux-2.2.18-pre12/drivers/net/arlan.c linux/drivers/net/arlan.c
--- linux-2.2.18-pre12/drivers/net/arlan.c	Mon Sep  4 10:39:19 2000
+++ linux/drivers/net/arlan.c	Mon Dec  3 20:30:40 2001
@@ -1346,7 +1346,7 @@
 	priv->timer.function = &arlan_registration_timer;	/* timer handler */
 
 	arlan_command(dev, ARLAN_COMMAND_POWERUP | ARLAN_COMMAND_LONG_WAIT_NOW);
-	udelay(200000);
+	mdelay(200);
 	dev->tbusy = 0;
 	dev->start = 1;
 	add_timer(&priv->timer);
diff -urN linux-2.2.18-pre12/drivers/net/cops.c linux/drivers/net/cops.c
--- linux-2.2.18-pre12/drivers/net/cops.c	Wed Oct  7 15:51:45 1998
+++ linux/drivers/net/cops.c	Mon Dec  3 20:30:40 2001
@@ -363,7 +363,8 @@
         {
                 outb(0, ioaddr+DAYNA_RESET);
                 inb(ioaddr+DAYNA_RESET);
-                udelay(333333);
+                current->state = TASK_UNINTERRUPTIBLE;
+                schedule_timeout(HZ/3);
         }
         if(board==TANGENT)
         {
@@ -499,7 +500,7 @@
                                 schedule();
                 }
                 else
-                        udelay(333333);
+                        mdelay(334);
         }
         dev->tbusy=0;
 
diff -urN linux-2.2.18-pre12/drivers/net/irda/toshoboe.c linux/drivers/net/irda/toshoboe.c
--- linux-2.2.18-pre12/drivers/net/irda/toshoboe.c	Wed Jun  7 14:26:43 2000
+++ linux/drivers/net/irda/toshoboe.c	Mon Dec  3 20:30:40 2001
@@ -902,7 +902,7 @@
 /*FIXME: can't sleep here wait one second */
 
   while ((i--) && (self->txpending))
-    udelay (100000);
+    mdelay (100);
 
   toshoboe_stopchip (self);
   toshoboe_disablebm (self);
diff -urN linux-2.2.18-pre12/drivers/net/ltpc.c linux/drivers/net/ltpc.c
--- linux-2.2.18-pre12/drivers/net/ltpc.c	Fri Jan 15 14:36:21 1999
+++ linux/drivers/net/ltpc.c	Mon Dec  3 20:30:40 2001
@@ -353,13 +353,12 @@
 	/* returns true if it stayed c */
 	/* this uses base+6, but it's ok */
 	int i;
-	int timeout;
 
 	/* twenty second or so total */
 
-	for(i=0;i<20000;i++) {
+	for(i=0;i<200000;i++) {
 		if ( c != inb_p(dev->base_addr+6) ) return 0;
-		for(timeout=loops_per_sec/1000; timeout > 0; timeout--) ;
+		udelay(100);
 	}
 	return 1; /* timed out */
 }
diff -urN linux-2.2.18-pre12/drivers/net/ni52.c linux/drivers/net/ni52.c
--- linux-2.2.18-pre12/drivers/net/ni52.c	Tue Jun  8 10:27:27 1999
+++ linux/drivers/net/ni52.c	Mon Dec  3 20:30:40 2001
@@ -160,9 +160,9 @@
 /**************************************************************************/
 
 /* different DELAYs */
-#define DELAY(x) __delay((loops_per_sec>>5)*(x));
-#define DELAY_16(); { __delay( (loops_per_sec>>16)+1 ); }
-#define DELAY_18(); { __delay( (loops_per_sec>>18)+1 ); }
+#define DELAY(x) mdelay(32 * x);
+#define DELAY_16(); { udelay(16); }
+#define DELAY_18(); { udelay(4); }
 
 /* wait for command with timeout: */
 #define WAIT_4_SCB_CMD() \
diff -urN linux-2.2.18-pre12/drivers/scsi/eata_dma.c linux/drivers/scsi/eata_dma.c
--- linux-2.2.18-pre12/drivers/scsi/eata_dma.c	Mon Aug  9 12:04:40 1999
+++ linux/drivers/scsi/eata_dma.c	Mon Dec  3 20:30:40 2001
@@ -687,7 +687,8 @@
 int eata_reset(Scsi_Cmnd * cmd, unsigned int resetflags)
 {
     uint x; 
-    ulong loop = loops_per_sec / 3;
+    /* 10 million PCI reads take at least one third of a second */
+    ulong loop = 10 * 1000 * 1000;
     ulong flags;
     unchar success = FALSE;
     Scsi_Cmnd *sp; 
diff -urN linux-2.2.18-pre12/drivers/scsi/pci2220i.c linux/drivers/scsi/pci2220i.c
--- linux-2.2.18-pre12/drivers/scsi/pci2220i.c	Wed May  3 17:16:45 2000
+++ linux/drivers/scsi/pci2220i.c	Mon Dec  3 20:30:40 2001
@@ -373,7 +373,7 @@
 static int HardReset (PADAPTER2220I padapter, POUR_DEVICE pdev, UCHAR spigot)
 	{
 	DEB (printk ("\npci2220i:RESET  spigot = %X  devices = %d, %d", spigot, pdev->deviceID[0], pdev->deviceID[1]));
-	udelay (100000);										// just wait 100 mSec to let drives flush	
+	mdelay (100);										// just wait 100 mSec to let drives flush	
 	SelectSpigot (padapter, spigot | SEL_IRQ_OFF);
 	
 	outb_p (0x0E, padapter->regAltStat);					// reset the suvivor
@@ -2953,7 +2953,7 @@
 		{
 		padapter->reconOn = FALSE;						// shut down the hot reconstruct
 		if ( padapter->reconPhase )
-			udelay (300000);
+			mdelay (300);
 		if ( padapter->reconTimer.data )				// is the timer running?
 			{
 			del_timer (&padapter->reconTimer);
diff -urN linux-2.2.18-pre12/drivers/sound/wavfront.c linux/drivers/sound/wavfront.c
--- linux-2.2.18-pre12/drivers/sound/wavfront.c	Thu Jan 14 22:59:47 1999
+++ linux/drivers/sound/wavfront.c	Mon Dec  3 20:30:40 2001
@@ -87,14 +87,14 @@
  
 #if defined(__alpha__)
 #ifdef __SMP__
-#define LOOPS_PER_SEC cpu_data[smp_processor_id()].loops_per_sec
+#define LOOPS_PER_TICK (cpu_data[smp_processor_id()].loops_per_jiffy/HZ)
 #else
-#define LOOPS_PER_SEC	loops_per_sec
+#define LOOPS_PER_TICK	(loops_per_jiffy/HZ)
 #endif
 #endif
 
 #if defined(__i386__)
-#define LOOPS_PER_SEC current_cpu_data.loops_per_sec
+#define LOOPS_PER_TICK current_cpu_data.loops_per_jiffy
 #endif
  
 #define _MIDI_SYNTH_C_
@@ -459,7 +459,7 @@
 
 	if (short_loop_cnt == 0) {
 		short_loop_cnt = wait_usecs *
-			(LOOPS_PER_SEC / 1000000);
+			(LOOPS_PER_TICK / 1000000);
 	}
 
 	/* Spin for a short period of time, because >99% of all
diff -urN linux-2.2.18-pre12/drivers/sound/ymfpci.c linux/drivers/sound/ymfpci.c
--- linux-2.2.18-pre12/drivers/sound/ymfpci.c	Mon Dec  3 20:30:08 2001
+++ linux/drivers/sound/ymfpci.c	Mon Dec  3 20:30:40 2001
@@ -1486,7 +1486,7 @@
 				mask |= POLLOUT | POLLWRNORM;
 		}
 	}
-	spin_unlock_irqrestore(&state->card->lock, flags);
+	spin_unlock_irqrestore(&state->unit->reg_lock, flags);
 
 	return mask;
 }
diff -urN linux-2.2.18-pre12/drivers/usb/input.c linux/drivers/usb/input.c
--- linux-2.2.18-pre12/drivers/usb/input.c	Mon Dec  3 20:30:08 2001
+++ linux/drivers/usb/input.c	Mon Dec  3 20:30:40 2001
@@ -379,8 +379,8 @@
 {
 	char devfs_name[16];
 	sprintf(devfs_name, name, minor);
-	return devfs_register(input_devfs_handle, devfs_name, 0, DEVFS_FL_DEFAULT, INPUT_MAJOR, minor + minor_base,
-		S_IFCHR | S_IRUGO | S_IWUSR, 0, 0, &input_fops, NULL);
+	return devfs_register(input_devfs_handle, devfs_name, DEVFS_FL_DEFAULT, INPUT_MAJOR, minor + minor_base,
+		S_IFCHR | S_IRUGO | S_IWUSR, &input_fops, NULL);
 }
 
 void input_unregister_minor(devfs_handle_t handle)
diff -urN linux-2.2.18-pre12/drivers/usb/uhci.c linux/drivers/usb/uhci.c
--- linux-2.2.18-pre12/drivers/usb/uhci.c	Mon Dec  3 20:30:08 2001
+++ linux/drivers/usb/uhci.c	Mon Dec  3 20:30:41 2001
@@ -2426,7 +2426,7 @@
 	return 0;
 }
 
-int __init uhci_init(void)
+static int __init uhci_init(void)
 {
 	int retval;
 	struct pci_dev *dev;
diff -urN linux-2.2.18-pre12/drivers/usb/usb-core.c linux/drivers/usb/usb-core.c
--- linux-2.2.18-pre12/drivers/usb/usb-core.c	Mon Dec  3 20:30:08 2001
+++ linux/drivers/usb/usb-core.c	Mon Dec  3 20:30:41 2001
@@ -60,12 +60,6 @@
 	usb_hub_init();
 
 #ifndef CONFIG_USB_MODULE
-#ifdef CONFIG_USB_UHCI
-	uhci_init();
-#endif
-#ifdef CONFIG_USB_UHCI_ALT
-	uhci_init();
-#endif
 #ifdef CONFIG_USB_OHCI
 	ohci_hcd_init(); 
 #endif
diff -urN linux-2.2.18-pre12/drivers/usb/usb-uhci.c linux/drivers/usb/usb-uhci.c
--- linux-2.2.18-pre12/drivers/usb/usb-uhci.c	Mon Dec  3 20:30:08 2001
+++ linux/drivers/usb/usb-uhci.c	Mon Dec  3 20:30:41 2001
@@ -2822,7 +2822,7 @@
 	return -1;
 }
 
-int __init uhci_init (void)
+static int __init uhci_init (void)
 {
 	int retval = -ENODEV;
 	struct pci_dev *dev = NULL;
diff -urN linux-2.2.18-pre12/include/asm-i386/bugs.h linux/include/asm-i386/bugs.h
--- linux-2.2.18-pre12/include/asm-i386/bugs.h	Mon Aug  9 12:04:57 1999
+++ linux/include/asm-i386/bugs.h	Mon Dec  3 20:30:41 2001
@@ -330,7 +330,7 @@
 		if (ccr5 & 2) { /* possible wrong calibration done */
 			printk(KERN_INFO "Recalibrating delay loop with SLOP bit reset\n");
 			calibrate_delay();
-			boot_cpu_data.loops_per_sec = loops_per_sec;
+			boot_cpu_data.loops_per_jiffy = loops_per_jiffy;
 		}
 	}
 }
diff -urN linux-2.2.18-pre12/include/asm-i386/delay.h linux/include/asm-i386/delay.h
--- linux-2.2.18-pre12/include/asm-i386/delay.h	Wed May  3 17:16:47 2000
+++ linux/include/asm-i386/delay.h	Mon Dec  3 20:30:41 2001
@@ -7,13 +7,15 @@
  * Delay routines calling functions in arch/i386/lib/delay.c
  */
  
+extern void __bad_udelay(void);
+
 extern void __const_udelay(unsigned long usecs);
 extern void __udelay(unsigned long usecs);
 extern void __delay(unsigned long loops);
 
 
 #define udelay(n) (__builtin_constant_p(n) ? \
-	__const_udelay((n) * 0x10c6ul) : \
+	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
 	__udelay(n))
 	
 #endif /* defined(_I386_DELAY_H) */
diff -urN linux-2.2.18-pre12/include/asm-i386/processor.h linux/include/asm-i386/processor.h
--- linux-2.2.18-pre12/include/asm-i386/processor.h	Mon Sep  4 10:39:28 2000
+++ linux/include/asm-i386/processor.h	Mon Dec  3 20:30:41 2001
@@ -36,7 +36,7 @@
 	int	fdiv_bug;
 	int	f00f_bug;
 	int	coma_bug;
-	unsigned long loops_per_sec;
+	unsigned long loops_per_jiffy;
 	unsigned long *pgd_quick;
 	unsigned long *pte_quick;
 	unsigned long pgtable_cache_sz;
diff -urN linux-2.2.18-pre12/include/linux/delay.h linux/include/linux/delay.h
--- linux-2.2.18-pre12/include/linux/delay.h	Thu May 21 14:24:09 1998
+++ linux/include/linux/delay.h	Mon Dec  3 20:30:41 2001
@@ -4,10 +4,10 @@
 /*
  * Copyright (C) 1993 Linus Torvalds
  *
- * Delay routines, using a pre-computed "loops_per_second" value.
+ * Delay routines, using a pre-computed "loops_per_jiffy" value.
  */
 
-extern unsigned long loops_per_sec;
+extern unsigned long loops_per_jiffy;
 
 #include <asm/delay.h>
 
diff -urN linux-2.2.18-pre12/include/linux/devfs_fs.h linux/include/linux/devfs_fs.h
--- linux-2.2.18-pre12/include/linux/devfs_fs.h	Wed Dec 31 16:00:00 1969
+++ linux/include/linux/devfs_fs.h	Mon Dec  3 20:30:41 2001
@@ -0,0 +1,42 @@
+#ifndef _LINUX_DEVFS_FS_H
+#define _LINUX_DEVFS_FS_H
+
+#include <linux/ioctl.h>
+
+#define DEVFSD_PROTOCOL_REVISION_KERNEL  5
+
+#define	DEVFSD_IOCTL_BASE	'd'
+
+/*  These are the various ioctls  */
+#define DEVFSDIOC_GET_PROTO_REV         _IOR(DEVFSD_IOCTL_BASE, 0, int)
+#define DEVFSDIOC_SET_EVENT_MASK        _IOW(DEVFSD_IOCTL_BASE, 2, int)
+#define DEVFSDIOC_RELEASE_EVENT_QUEUE   _IOW(DEVFSD_IOCTL_BASE, 3, int)
+#define DEVFSDIOC_SET_DEBUG_MASK        _IOW(DEVFSD_IOCTL_BASE, 4, int)
+
+#define DEVFSD_NOTIFY_REGISTERED    0
+#define DEVFSD_NOTIFY_UNREGISTERED  1
+#define DEVFSD_NOTIFY_ASYNC_OPEN    2
+#define DEVFSD_NOTIFY_CLOSE         3
+#define DEVFSD_NOTIFY_LOOKUP        4
+#define DEVFSD_NOTIFY_CHANGE        5
+#define DEVFSD_NOTIFY_CREATE        6
+
+#define DEVFS_PATHLEN               1024  /*  Never change this otherwise the
+					      binary interface will change   */
+
+struct devfsd_notify_struct
+{
+    unsigned int type;           /*  DEVFSD_NOTIFY_* value                   */
+    unsigned int mode;           /*  Mode of the inode or device entry       */
+    unsigned int major;          /*  Major number of device entry            */
+    unsigned int minor;          /*  Minor number of device entry            */
+    unsigned int uid;            /*  Uid of process, inode or device entry   */
+    unsigned int gid;            /*  Gid of process, inode or device entry   */
+    unsigned int overrun_count;  /*  Number of lost events                   */
+    unsigned int namelen;        /*  Number of characters not including '\0' */
+    /*  The device name MUST come last                                       */
+    char devname[DEVFS_PATHLEN]; /*  This will be '\0' terminated            */
+};
+
+
+#endif  /*  _LINUX_DEVFS_FS_H  */
diff -urN linux-2.2.18-pre12/include/linux/devfs_fs_kernel.h linux/include/linux/devfs_fs_kernel.h
--- linux-2.2.18-pre12/include/linux/devfs_fs_kernel.h	Mon Dec  3 20:30:09 2001
+++ linux/include/linux/devfs_fs_kernel.h	Mon Dec  3 20:30:41 2001
@@ -1,9 +1,247 @@
-typedef int* devfs_handle_t;
+#ifndef _LINUX_DEVFS_FS_KERNEL_H
+#define _LINUX_DEVFS_FS_KERNEL_H
 
-#define devfs_register(a,b,c,d,e,f,g,h,i,j,k)	NULL
-#define devfs_unregister(a)
-#define devfs_mk_dir(a,b,c,d)			NULL
-#define devfs_register_chrdev(a,b,c)		register_chrdev(a,b,c)
-#define devfs_unregister_chrdev(a,b)		unregister_chrdev(a,b)
+#include <linux/fs.h>
+#include <linux/config.h>
+
+#define DEVFS_SUPER_MAGIC                0x1373
+
+#define IS_DEVFS_INODE(inode) (DEVFS_SUPER_MAGIC == (inode)->i_sb->s_magic)
+
+#define DEVFS_MINOR(inode) \
+    ({unsigned int m; /* evil GCC trickery */ \
+      ((inode)->i_sb && \
+       ((inode)->i_sb->s_magic==DEVFS_SUPER_MAGIC) && \
+       (devfs_get_maj_min(devfs_get_handle_from_inode((inode)),NULL,&m)==0) \
+      ) ? m : MINOR((inode)->r_dev); })
+
+
+#define DEVFS_FL_NONE           0x000 /* This helps to make code more readable
+				       */
+#define DEVFS_FL_AUTO_OWNER     0x001 /* When a closed inode is opened the
+					 ownerships are set to the opening
+					 process and the protection is set to
+					 that given in <<mode>>. When the inode
+					 is closed, ownership reverts back to
+					 <<uid>> and <<gid>> and the protection
+					 is set to read-write for all        */
+#define DEVFS_FL_SHOW_UNREG     0x002 /* Show unregistered entries in
+					 directory listings                  */
+#define DEVFS_FL_HIDE           0x004 /* Do not show entry in directory list */
+#define DEVFS_FL_AUTO_DEVNUM    0x008 /* Automatically generate device number
+				       */
+#define DEVFS_FL_AOPEN_NOTIFY   0x010 /* Asynchronously notify devfsd on open
+				       */
+#define DEVFS_FL_REMOVABLE      0x020 /* This is a removable media device    */
+#define DEVFS_FL_WAIT           0x040 /* Wait for devfsd to finish           */
+#define DEVFS_FL_NO_PERSISTENCE 0x080 /* Forget changes after unregister     */
+#define DEVFS_FL_CURRENT_OWNER  0x100 /* Set initial ownership to current    */
+#define DEVFS_FL_DEFAULT        DEVFS_FL_NONE
+
+
+#define DEVFS_SPECIAL_CHR     0
+#define DEVFS_SPECIAL_BLK     1
+
+typedef struct devfs_entry * devfs_handle_t;
+
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#  define ROOT_DEVICE_NAME ((real_root_dev ==ROOT_DEV) ? root_device_name:NULL)
+#else
+#  define ROOT_DEVICE_NAME root_device_name
+#endif
+
+
+#ifdef CONFIG_DEVFS_FS
+extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
+				      unsigned int flags,
+				      unsigned int major, unsigned int minor,
+				      umode_t mode,
+				      struct file_operations *fops,
+				      void *info);
+extern void devfs_unregister (devfs_handle_t de);
+extern int devfs_mk_symlink (devfs_handle_t dir,
+			     const char *name, unsigned int namelen,
+			     unsigned int flags,
+			     const char *link, unsigned int linklength,
+			     devfs_handle_t *handle, void *info);
+extern devfs_handle_t devfs_mk_dir (devfs_handle_t dir, const char *name,
+				    unsigned int namelen, void *info);
+extern int devfs_fill_file (struct inode *inode, struct file *file,
+			    devfs_handle_t de);
+extern devfs_handle_t devfs_find_handle (devfs_handle_t dir,
+					 const char *name,unsigned int namelen,
+					 unsigned int major,unsigned int minor,
+					 char type, int traverse_symlinks);
+extern int devfs_get_flags (devfs_handle_t de, unsigned int *flags);
+extern int devfs_set_flags (devfs_handle_t de, unsigned int flags);
+extern int devfs_get_maj_min (devfs_handle_t de, 
+			      unsigned int *major, unsigned int *minor);
+extern devfs_handle_t devfs_get_handle_from_inode (struct inode *inode);
+extern int devfs_generate_path (devfs_handle_t de, char *path, int buflen);
+extern struct file_operations *devfs_get_fops (devfs_handle_t de);
+extern int devfs_set_file_size (devfs_handle_t de, unsigned long size);
+extern void *devfs_get_info (devfs_handle_t de);
+extern int devfs_set_info (devfs_handle_t de, void *info);
+extern devfs_handle_t devfs_get_parent (devfs_handle_t de);
+extern devfs_handle_t devfs_get_first_child (devfs_handle_t de);
+extern devfs_handle_t devfs_get_next_sibling (devfs_handle_t de);
+extern void devfs_auto_unregister (devfs_handle_t master,devfs_handle_t slave);
+extern devfs_handle_t devfs_get_unregister_slave (devfs_handle_t master);
+extern int devfs_register_chrdev (unsigned int major, const char *name,
+				  struct file_operations *fops);
+extern int devfs_register_blkdev (unsigned int major, const char *name,
+				  struct file_operations *fops);
+extern int devfs_unregister_chrdev (unsigned int major, const char *name);
+extern int devfs_unregister_blkdev (unsigned int major, const char *name);
+
+extern void devfs_register_tape (devfs_handle_t de);
+
+extern int init_devfs_fs (void);
+extern void mount_devfs_fs (void);
+extern void devfs_make_root (const char *name);
+#else  /*  CONFIG_DEVFS_FS  */
+static inline devfs_handle_t devfs_register (devfs_handle_t dir,
+					     const char *name,
+					     unsigned int flags,
+					     unsigned int major,
+					     unsigned int minor,
+					     umode_t mode,
+					     struct file_operations *fops,
+					     void *info)
+{
+    return NULL;
+}
+static inline void devfs_unregister (devfs_handle_t de)
+{
+    return;
+}
+static inline int devfs_mk_symlink (devfs_handle_t dir,
+				    const char *name, unsigned int namelen,
+				    unsigned int flags,
+				    const char *link, unsigned int linklength,
+				    devfs_handle_t *handle, void *info)
+{
+    return 0;
+}
+static inline devfs_handle_t devfs_mk_dir (devfs_handle_t dir,
+					   const char *name,
+					   unsigned int namelen, void *info)
+{
+    return NULL;
+}
+static inline int devfs_fill_file (struct inode *inode, struct file *file,
+				   devfs_handle_t de)
+{
+    return -ENOSYS;
+}
+static inline devfs_handle_t devfs_find_handle (devfs_handle_t dir,
+						const char *name,
+						unsigned int namelen,
+						unsigned int major,
+						unsigned int minor,
+						char type,
+						int traverse_symlinks)
+{
+    return NULL;
+}
+static inline int devfs_get_flags (devfs_handle_t de, unsigned int *flags)
+{
+    return 0;
+}
+static inline int devfs_set_flags (devfs_handle_t de, unsigned int flags)
+{
+    return 0;
+}
+static inline int devfs_get_maj_min (devfs_handle_t de, 
+				     unsigned int *major, unsigned int *minor)
+{
+    return 0;
+}
+static inline devfs_handle_t devfs_get_handle_from_inode (struct inode *inode)
+{
+    return NULL;
+}
+static inline int devfs_generate_path (devfs_handle_t de, char *path,
+				       int buflen)
+{
+    return -ENOSYS;
+}
+static inline struct file_operations *devfs_get_fops (devfs_handle_t de)
+{
+    return NULL;
+}
+static inline int devfs_set_file_size (devfs_handle_t de, unsigned long size)
+{
+    return -ENOSYS;
+}
+static inline void *devfs_get_info (devfs_handle_t de, unsigned long size)
+{
+    return NULL;
+}
+static inline int devfs_set_info (devfs_handle_t de, void *info)
+{
+    return 0;
+}
+static inline devfs_handle_t devfs_get_parent (devfs_handle_t de)
+{
+    return NULL;
+}
+static inline devfs_handle_t devfs_get_first_child (devfs_handle_t de)
+{
+    return NULL;
+}
+static inline devfs_handle_t devfs_get_next_sibling (devfs_handle_t de)
+{
+    return NULL;
+}
+static inline void devfs_auto_unregister (devfs_handle_t master,
+					  devfs_handle_t slave)
+{
+    return;
+}
+static inline devfs_handle_t devfs_get_unregister_slave (devfs_handle_t master)
+{
+    return NULL;
+}
+static inline int devfs_register_chrdev (unsigned int major, const char *name,
+					 struct file_operations *fops)
+{
+    return register_chrdev (major, name, fops);
+}
+static inline int devfs_register_blkdev (unsigned int major, const char *name,
+					 struct file_operations *fops)
+{
+    return register_blkdev (major, name, fops);
+}
+static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+{
+    return unregister_chrdev (major, name);
+}
+static inline int devfs_unregister_blkdev (unsigned int major,const char *name)
+{
+    return unregister_blkdev (major, name);
+}
+
+static inline void devfs_register_tape (devfs_handle_t de)
+{
+    return;
+}
+
+static inline int init_devfs_fs (void)
+{
+    return 0;
+}
+static inline void mount_devfs_fs (void)
+{
+    return;
+}
+static inline void devfs_make_root (const char *name)
+{
+    return;
+}
+#endif  /*  CONFIG_DEVFS_FS  */
+
+#endif  /*  _LINUX_DEVFS_FS_KERNEL_H  */
 #define tty_register_devfs(driver,flags,minor)
 #define tty_unregister_devfs(driver,minor)
diff -urN linux-2.2.18-pre12/include/linux/dtlk.h linux/include/linux/dtlk.h
--- linux-2.2.18-pre12/include/linux/dtlk.h	Sun Mar  7 16:15:39 1999
+++ linux/include/linux/dtlk.h	Mon Dec  3 20:30:41 2001
@@ -27,7 +27,7 @@
 
 #define DTLK_CLEAR 0x18		/* stops speech */
 
-#define DTLK_MAX_RETRIES (loops_per_sec/10000)
+#define DTLK_MAX_RETRIES (loops_per_jiffy/(10000/HZ))
 
 	/* TTS Port Status Flags */
 #define TTS_READABLE     0x80	/* mask for bit which is nonzero if a
diff -urN linux-2.2.18-pre12/init/main.c linux/init/main.c
--- linux-2.2.18-pre12/init/main.c	Mon Dec  3 20:30:09 2001
+++ linux/init/main.c	Mon Dec  3 20:30:41 2001
@@ -759,7 +759,7 @@
 #ifdef CONFIG_VT
 	{ "kbd-reset", kbd_reset_setup },
 #endif
-#ifdef CONFIG_PSMOUSE
+#if defined(CONFIG_PSMOUSE) && defined (CONFIG_VT)
 	{ "psaux-reconnect", aux_reconnect_setup },
 #endif
 #ifdef CONFIG_BUGi386
@@ -1186,9 +1186,9 @@
 
 /* this should be approx 2 Bo*oMips to start (note initial shift), and will
    still work even if initially too large, it will just take slightly longer */
-unsigned long loops_per_sec = (1<<12);
+unsigned long loops_per_jiffy = (1<<12);
 
-/* This is the number of bits of precision for the loops_per_second.  Each
+/* This is the number of bits of precision for the loops_per_jiffy.  Each
    bit takes on average 1.5/HZ seconds.  This (like the original) is a little
    better than 1% */
 #define LPS_PREC 8
@@ -1198,42 +1198,40 @@
 	unsigned long ticks, loopbit;
 	int lps_precision = LPS_PREC;
 
-	loops_per_sec = (1<<12);
+	loops_per_jiffy = (1<<12);
 
 	printk("Calibrating delay loop... ");
-	while (loops_per_sec <<= 1) {
+	while (loops_per_jiffy <<= 1) {
 		/* wait for "start of" clock tick */
 		ticks = jiffies;
 		while (ticks == jiffies)
 			/* nothing */;
 		/* Go .. */
 		ticks = jiffies;
-		__delay(loops_per_sec);
+		__delay(loops_per_jiffy);
 		ticks = jiffies - ticks;
 		if (ticks)
 			break;
 	}
 
-/* Do a binary approximation to get loops_per_second set to equal one clock
+/* Do a binary approximation to get loops_per_jiffy set to equal one clock
    (up to lps_precision bits) */
-	loops_per_sec >>= 1;
-	loopbit = loops_per_sec;
+	loops_per_jiffy >>= 1;
+	loopbit = loops_per_jiffy;
 	while ( lps_precision-- && (loopbit >>= 1) ) {
-		loops_per_sec |= loopbit;
+		loops_per_jiffy |= loopbit;
 		ticks = jiffies;
 		while (ticks == jiffies);
 		ticks = jiffies;
-		__delay(loops_per_sec);
+		__delay(loops_per_jiffy);
 		if (jiffies != ticks)	/* longer than 1 tick */
-			loops_per_sec &= ~loopbit;
+			loops_per_jiffy &= ~loopbit;
 	}
 
-/* finally, adjust loops per second in terms of seconds instead of clocks */	
-	loops_per_sec *= HZ;
 /* Round the value and print it */	
 	printk("%lu.%02lu BogoMIPS\n",
-		(loops_per_sec+2500)/500000,
-		((loops_per_sec+2500)/5000) % 100);
+		(loops_per_jiffy+2500)/(500000/HZ),
+		((loops_per_jiffy+2500)/(5000/HZ)) % 100);
 }
 
 /*
diff -urN linux-2.2.18-pre12/kernel/ksyms.c linux/kernel/ksyms.c
--- linux-2.2.18-pre12/kernel/ksyms.c	Mon Dec  3 20:30:09 2001
+++ linux/kernel/ksyms.c	Mon Dec  3 20:30:41 2001
@@ -347,7 +347,7 @@
 EXPORT_SYMBOL(jiffies);
 EXPORT_SYMBOL(xtime);
 EXPORT_SYMBOL(do_gettimeofday);
-EXPORT_SYMBOL(loops_per_sec);
+EXPORT_SYMBOL(loops_per_jiffy);
 EXPORT_SYMBOL(kstat);
 EXPORT_SYMBOL(pidhash); 
 
