--- linux-2.6.11.11/arch/i386/Kconfig	2005-03-02 12:38:20 +0100
+++ linux-2.6.11.11-vs2.0-rc3/arch/i386/Kconfig	2005-06-01 14:34:17 +0200
@@ -568,6 +568,14 @@ config X86_IO_APIC
 	depends on !SMP && X86_UP_IOAPIC
 	default y
 
+config KERNEL_HZ
+	int "Timer Frequency (100-10000)"
+	range 100 10000
+	default "1000"
+	help
+	  This allows you to specify the frequency at which the
+	  kernel timer interrupt will occur.
+
 config X86_TSC
 	bool
 	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ
--- linux-2.6.11.11/arch/i386/kernel/cpu/proc.c	2005-03-02 12:38:20 +0100
+++ linux-2.6.11.11-vs2.0-rc3/arch/i386/kernel/cpu/proc.c	2005-06-01 14:34:17 +0200
@@ -124,8 +124,8 @@ static int show_cpuinfo(struct seq_file 
 			seq_printf(m, " %s", x86_cap_flags[i]);
 
 	seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
-		     c->loops_per_jiffy/(500000/HZ),
-		     (c->loops_per_jiffy/(5000/HZ)) % 100);
+		     HZ*(c->loops_per_jiffy >> 3)/62500,
+		     (HZ*(c->loops_per_jiffy >> 3)/625) % 100);
 	return 0;
 }
 
--- linux-2.6.11.11/arch/i386/kernel/smpboot.c	2005-03-02 12:38:20 +0100
+++ linux-2.6.11.11-vs2.0-rc3/arch/i386/kernel/smpboot.c	2005-06-01 14:34:17 +0200
@@ -1025,8 +1025,8 @@ static void __init smp_boot_cpus(unsigne
 	printk(KERN_INFO
 		"Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
 		cpucount+1,
-		bogosum/(500000/HZ),
-		(bogosum/(5000/HZ))%100);
+		HZ*(bogosum >> 3)/62500,
+		(HZ*(bogosum >> 3)/625) % 100);
 	
 	Dprintk("Before bogocount - setting activated=1.\n");
 
--- linux-2.6.11.11/arch/ppc/boot/include/serial.h	2004-10-23 05:05:59 +0200
+++ linux-2.6.11.11-vs2.0-rc3/arch/ppc/boot/include/serial.h	2005-06-01 14:34:17 +0200
@@ -36,8 +36,8 @@ struct serial_state {
 	int	count;
 	u8	*iomem_base;
 	u16	iomem_reg_shift;
-	unsigned short	close_delay;
-	unsigned short	closing_wait; /* time to wait before closing */
+	unsigned int	close_delay;
+	unsigned int	closing_wait; /* time to wait before closing */
 	unsigned long	icount;
 	int	io_type;
 	void    *info;
--- linux-2.6.11.11/drivers/acpi/osl.c	2005-03-02 12:38:28 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/acpi/osl.c	2005-06-01 14:34:17 +0200
@@ -938,7 +938,7 @@ acpi_os_wait_semaphore(
 		// TODO: A better timeout algorithm?
 		{
 			int i = 0;
-			static const int quantum_ms = 1000/HZ;
+			static const int quantum_ms = (HZ>1000)?1:(1000/HZ);
 
 			ret = down_trylock(sem);
 			for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
--- linux-2.6.11.11/drivers/block/floppy.c	2005-03-02 12:38:28 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/block/floppy.c	2005-06-01 14:34:17 +0200
@@ -4084,7 +4084,7 @@ static void __init daring(int *ints, int
 			    FD_SILENT_DCL_CLEAR;
 		} else {
 			default_drive_params[i].params.select_delay =
-			    2 * HZ / 100;
+			    SEL_DLY;
 			default_drive_params[i].params.flags &=
 			    ~FD_SILENT_DCL_CLEAR;
 		}
--- linux-2.6.11.11/drivers/char/cyclades.c	2005-03-02 12:38:29 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/cyclades.c	2005-06-01 14:34:17 +0200
@@ -4054,7 +4054,7 @@ cy_ioctl(struct tty_struct *tty, struct 
 	    break;
 #endif /* CONFIG_CYZ_INTR */
 	case CYSETWAIT:
-    	    info->closing_wait = (unsigned short)arg * HZ/100;
+	    info->closing_wait = (unsigned int)arg * HZ/100;
 	    ret_val = 0;
 	    break;
 	case CYGETWAIT:
--- linux-2.6.11.11/drivers/char/dtlk.c	2004-12-25 01:54:52 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/dtlk.c	2005-06-01 14:34:17 +0200
@@ -198,7 +198,7 @@ static ssize_t dtlk_write(struct file *f
 				   up to 250 usec for the RDY bit to
 				   go nonzero. */
 				for (retries = 0;
-				     retries < loops_per_jiffy / (4000/HZ);
+				     retries < HZ*(loops_per_jiffy >> 3)/500;
 				     retries++)
 					if (inb_p(dtlk_port_tts) &
 					    TTS_WRITABLE)
--- linux-2.6.11.11/drivers/char/dtlk.c	2004-12-25 01:54:52 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/dtlk.c	2005-06-01 14:34:17 +0200
@@ -445,7 +445,7 @@ for (i = 0; i < 10; i++)			\
 				LOOK
 				dtlk_write_bytes("\0012I\r", 4);
 				buffer[b++] = 0;
-				__delay(50 * loops_per_jiffy / (1000/HZ));
+				__delay(50 * (loops_per_jiffy >> 3) * HZ / 125);
 				outb_p(0xff, dtlk_port_lpc);
 				buffer[b++] = 0;
 				LOOK
--- linux-2.6.11.11/drivers/char/isicom.c	2005-03-02 12:38:30 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/isicom.c	2005-06-01 14:34:17 +0200
@@ -197,7 +197,7 @@ struct	isi_port {
 	int			close_delay;
 	unsigned short		channel;
 	unsigned short		status;
-	unsigned short		closing_wait;
+	unsigned int		closing_wait;
 	struct isi_board	* card;
 	struct tty_struct 	* tty;
 	wait_queue_head_t	close_wait;
--- linux-2.6.11.11/drivers/char/moxa.c	2004-12-25 01:54:53 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/moxa.c	2005-06-01 14:34:17 +0200
@@ -148,7 +148,7 @@ struct moxa_str {
 	int type;
 	int port;
 	int close_delay;
-	unsigned short closing_wait;
+	unsigned int closing_wait;
 	int count;
 	int blocked_open;
 	long event; /* long req'd for set_bit --RR */
--- linux-2.6.11.11/drivers/char/mxser.c	2005-03-02 12:38:30 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/mxser.c	2005-06-01 14:34:17 +0200
@@ -316,7 +316,7 @@ struct mxser_struct {
 	int custom_divisor;
 	int x_char;		/* xon/xoff character */
 	int close_delay;
-	unsigned short closing_wait;
+	unsigned int closing_wait;
 	int IER;		/* Interrupt Enable Register */
 	int MCR;		/* Modem control register */
 	unsigned long event;
--- linux-2.6.11.11/drivers/char/pcmcia/synclink_cs.c	2005-03-02 12:38:30 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/pcmcia/synclink_cs.c	2005-06-01 14:34:17 +0200
@@ -146,8 +146,8 @@ typedef struct _mgslpc_info {
 	int			flags;
 	int			count;		/* count of opens */
 	int			line;
-	unsigned short		close_delay;
-	unsigned short		closing_wait;	/* time to wait before closing */
+	unsigned int		close_delay;
+	unsigned int		closing_wait;	/* time to wait before closing */
 	
 	struct mgsl_icount	icount;
 	
--- linux-2.6.11.11/drivers/char/riscom8.h	2004-08-14 12:56:24 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/riscom8.h	2005-06-01 14:34:17 +0200
@@ -85,7 +85,7 @@ struct riscom_port {
 	struct work_struct	tqueue_hangup;
 	short			wakeup_chars;
 	short			break_length;
-	unsigned short		closing_wait;
+	unsigned int		closing_wait;
 	unsigned char		mark_mask;
 	unsigned char		IER;
 	unsigned char		MSVR;
--- linux-2.6.11.11/drivers/char/specialix_io8.h	2004-08-14 12:54:46 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/specialix_io8.h	2005-06-01 14:34:17 +0200
@@ -124,7 +124,7 @@ struct specialix_port {
 	struct work_struct	tqueue_hangup;
 	short			wakeup_chars;
 	short			break_length;
-	unsigned short		closing_wait;
+	unsigned int		closing_wait;
 	unsigned char		mark_mask;
 	unsigned char		IER;
 	unsigned char		MSVR;
--- linux-2.6.11.11/drivers/char/synclink.c	2005-03-02 12:38:30 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/synclink.c	2005-06-01 14:34:17 +0200
@@ -189,8 +189,8 @@ struct mgsl_struct {
 	int			count;		/* count of opens */
 	int			line;
 	int                     hw_version;
-	unsigned short		close_delay;
-	unsigned short		closing_wait;	/* time to wait before closing */
+	unsigned int		close_delay;
+	unsigned int		closing_wait;	/* time to wait before closing */
 	
 	struct mgsl_icount	icount;
 	
--- linux-2.6.11.11/drivers/char/synclinkmp.c	2005-03-02 12:38:30 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/char/synclinkmp.c	2005-06-01 14:34:17 +0200
@@ -157,8 +157,8 @@ typedef struct _synclinkmp_info {
 	int			flags;
 	int			count;		/* count of opens */
 	int			line;
-	unsigned short		close_delay;
-	unsigned short		closing_wait;	/* time to wait before closing */
+	unsigned int		close_delay;
+	unsigned int		closing_wait;	/* time to wait before closing */
 
 	struct mgsl_icount	icount;
 
--- linux-2.6.11.11/drivers/macintosh/macserial.h	2004-08-14 12:56:26 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/macintosh/macserial.h	2005-06-01 14:34:17 +0200
@@ -22,11 +22,11 @@ struct serial_struct {
 	int	xmit_fifo_size;
 	int	custom_divisor;
 	int	baud_base;
-	unsigned short	close_delay;
+	unsigned int	close_delay;
 	char	reserved_char[2];
 	int	hub6;
-	unsigned short	closing_wait; /* time to wait before closing */
-	unsigned short	closing_wait2; /* no longer used... */
+	unsigned int	closing_wait; /* time to wait before closing */
+	unsigned int	closing_wait2; /* no longer used... */
 	int	reserved[4];
 };
 
--- linux-2.6.11.11/drivers/macintosh/macserial.h	2004-08-14 12:56:26 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/macintosh/macserial.h	2005-06-01 14:34:17 +0200
@@ -149,8 +149,8 @@ struct mac_serial {
 	int			custom_divisor;
 	int			x_char;	/* xon/xoff character */
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	unsigned long		event;
 	unsigned long		last_active;
 	int			line;
--- linux-2.6.11.11/drivers/net/wan/z85230.h	2004-08-14 12:55:48 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/net/wan/z85230.h	2005-06-01 14:34:17 +0200
@@ -348,7 +348,7 @@ struct z8530_channel
 	int			xmit_fifo_size;	/* Transmit FIFO info */
 
 	int			close_delay;	/* Do we wait for drain on close ? */
-	unsigned short		closing_wait;
+	unsigned int		closing_wait;
 
 	/* We need to know the current clock divisor
 	 * to read the bps rate the chip has currently
--- linux-2.6.11.11/drivers/sbus/char/aurora.h	2004-08-14 12:55:59 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/sbus/char/aurora.h	2005-06-01 14:34:17 +0200
@@ -258,7 +258,7 @@ struct Aurora_port {
 	struct tq_struct	tqueue_hangup;
 	short			wakeup_chars;
 	short			break_length;
-	unsigned short		closing_wait;
+	unsigned int		closing_wait;
 	unsigned char		mark_mask;
 	unsigned char		SRER;
 	unsigned char		MSVR;
--- linux-2.6.11.11/drivers/serial/68328serial.h	2004-08-14 12:56:22 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/serial/68328serial.h	2005-06-01 14:34:17 +0200
@@ -22,11 +22,11 @@ struct serial_struct {
 	int	xmit_fifo_size;
 	int	custom_divisor;
 	int	baud_base;
-	unsigned short	close_delay;
+	unsigned int	close_delay;
 	char	reserved_char[2];
 	int	hub6;  /* FIXME: We don't have AT&T Hub6 boards! */
-	unsigned short	closing_wait; /* time to wait before closing */
-	unsigned short	closing_wait2; /* no longer used... */
+	unsigned int	closing_wait; /* time to wait before closing */
+	unsigned int	closing_wait2; /* no longer used... */
 	int	reserved[4];
 };
 
--- linux-2.6.11.11/drivers/serial/68328serial.h	2004-08-14 12:56:22 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/serial/68328serial.h	2005-06-01 14:34:17 +0200
@@ -148,8 +148,8 @@ struct m68k_serial {
 	int			custom_divisor;
 	int			x_char;	/* xon/xoff character */
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	unsigned long		event;
 	unsigned long		last_active;
 	int			line;
--- linux-2.6.11.11/drivers/serial/68360serial.c	2004-12-25 01:55:13 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/serial/68360serial.c	2005-06-01 14:34:17 +0200
@@ -159,8 +159,8 @@ struct serial_state {
         int     count;
         u8      *iomem_base;
         u16     iomem_reg_shift;
-        unsigned short  close_delay;
-        unsigned short  closing_wait; /* time to wait before closing */
+	unsigned int  close_delay;
+	unsigned int  closing_wait; /* time to wait before closing */
         struct async_icount_24     icount; 
         int     io_type;
         struct async_struct *info;
--- linux-2.6.11.11/drivers/serial/68360serial.c	2004-12-25 01:55:13 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/serial/68360serial.c	2005-06-01 14:34:17 +0200
@@ -244,8 +244,8 @@ typedef struct serial_info {
 	int			line;
 	int			x_char;	/* xon/xoff character */
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	unsigned long		event;
 	unsigned long		last_active;
 	int			blocked_open; /* # of blocked opens */
--- linux-2.6.11.11/drivers/serial/crisv10.h	2004-12-25 01:55:13 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/serial/crisv10.h	2005-06-01 14:34:17 +0200
@@ -78,8 +78,8 @@ struct e100_serial {
 	int			ignore_status_mask;
 	int			x_char;	/* xon/xoff character */
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	unsigned long		event;
 	unsigned long		last_active;
 	int			line;
--- linux-2.6.11.11/drivers/serial/mcfserial.h	2004-08-14 12:54:48 +0200
+++ linux-2.6.11.11-vs2.0-rc3/drivers/serial/mcfserial.h	2005-06-01 14:34:17 +0200
@@ -52,8 +52,8 @@ struct mcf_serial {
 	int			x_char;	/* xon/xoff character */
 	int			baud_base;
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	unsigned long		event;
 	int			line;
 	int			count;	    /* # of fd on device */
--- linux-2.6.11.11/drivers/tc/zs.h	2005-03-02 12:38:41 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/tc/zs.h	2005-06-01 14:34:17 +0200
@@ -24,11 +24,11 @@ struct serial_struct {
 	int	xmit_fifo_size;
 	int	custom_divisor;
 	int	baud_base;
-	unsigned short	close_delay;
+	unsigned int	close_delay;
 	char	reserved_char[2];
 	int	hub6;
-	unsigned short	closing_wait; /* time to wait before closing */
-	unsigned short	closing_wait2; /* no longer used... */
+	unsigned int	closing_wait; /* time to wait before closing */
+	unsigned int	closing_wait2; /* no longer used... */
 	int	reserved[4];
 };
 
--- linux-2.6.11.11/drivers/tc/zs.h	2005-03-02 12:38:41 +0100
+++ linux-2.6.11.11-vs2.0-rc3/drivers/tc/zs.h	2005-06-01 14:34:17 +0200
@@ -128,8 +128,8 @@ struct dec_serial {
 	int			custom_divisor;
 	int			x_char;		/* XON/XOFF character.  */
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	unsigned long		event;
 	unsigned long		last_active;
 	int			line;
--- linux-2.6.11.11/include/asm-i386/param.h	2004-08-14 12:54:51 +0200
+++ linux-2.6.11.11-vs2.0-rc3/include/asm-i386/param.h	2005-06-01 14:34:17 +0200
@@ -1,8 +1,14 @@
 #ifndef _ASMi386_PARAM_H
 #define _ASMi386_PARAM_H
 
+#include <linux/config.h>
+
 #ifdef __KERNEL__
-# define HZ		1000		/* Internal kernel timer frequency */
+# ifdef CONFIG_KERNEL_HZ
+#  define HZ		CONFIG_KERNEL_HZ
+# else
+#  define HZ		1000		/* Internal kernel timer frequency */
+# endif
 # define USER_HZ	100		/* .. some user interfaces are in "ticks" */
 # define CLOCKS_PER_SEC		(USER_HZ)	/* like times() */
 #endif
--- linux-2.6.11.11/include/linux/cyclades.h	2004-10-23 05:06:22 +0200
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/cyclades.h	2005-06-01 14:34:17 +0200
@@ -585,7 +585,7 @@ struct cyclades_port {
 	int			custom_divisor;
 	int                     x_char; /* to be pushed out ASAP */
 	int			close_delay;
-	unsigned short		closing_wait;
+	unsigned int		closing_wait;
 	unsigned long		event;
 	unsigned long		last_active;
 	int			count;	/* # of fd on device */
--- linux-2.6.11.11/include/linux/dtlk.h	2004-08-14 12:56:01 +0200
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/dtlk.h	2005-06-01 14:34:17 +0200
@@ -27,7 +27,7 @@
 
 #define DTLK_CLEAR 0x18		/* stops speech */
 
-#define DTLK_MAX_RETRIES (loops_per_jiffy/(10000/HZ))
+#define DTLK_MAX_RETRIES (HZ*(loops_per_jiffy >> 3)/1250)
 
 	/* TTS Port Status Flags */
 #define TTS_READABLE     0x80	/* mask for bit which is nonzero if a
--- linux-2.6.11.11/include/linux/generic_serial.h	2005-03-02 12:38:52 +0100
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/generic_serial.h	2005-06-01 14:34:17 +0200
@@ -42,7 +42,7 @@ struct gs_port {
   int                     blocked_open;
   struct tty_struct       *tty;
   unsigned long           event;
-  unsigned short          closing_wait;
+  unsigned int            closing_wait;
   int                     close_delay;
   struct real_driver      *rd;
   int                     wakeup_chars;
--- linux-2.6.11.11/include/linux/hayesesp.h	2004-08-14 12:55:59 +0200
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/hayesesp.h	2005-06-01 14:34:17 +0200
@@ -87,8 +87,8 @@ struct esp_struct {
 	int			stat_flags;
 	int			custom_divisor;
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2;
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2;
 	int			IER; 	/* Interrupt Enable Register */
 	int			MCR; 	/* Modem control register */
 	unsigned long		event;
--- linux-2.6.11.11/include/linux/jiffies.h	2005-03-02 12:38:52 +0100
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/jiffies.h	2005-06-01 14:34:17 +0200
@@ -38,6 +38,14 @@
 # define SHIFT_HZ	9
 #elif HZ >= 768 && HZ < 1536
 # define SHIFT_HZ	10
+#elif HZ >= 1536 && HZ < 3072
+# define SHIFT_HZ      11
+#elif HZ >= 3072 && HZ < 6144
+# define SHIFT_HZ      12
+#elif HZ >= 6144 && HZ < 12288
+# define SHIFT_HZ      13
+#elif HZ >= 12288 && HZ < 24576
+# define SHIFT_HZ      14
 #else
 # error You lose.
 #endif
--- linux-2.6.11.11/include/linux/serial.h	2004-12-25 01:55:30 +0100
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/serial.h	2005-06-01 14:34:17 +0200
@@ -39,12 +39,12 @@ struct serial_struct {
 	int	xmit_fifo_size;
 	int	custom_divisor;
 	int	baud_base;
-	unsigned short	close_delay;
+	unsigned int	close_delay;
 	char	io_type;
 	char	reserved_char[1];
 	int	hub6;
-	unsigned short	closing_wait; /* time to wait before closing */
-	unsigned short	closing_wait2; /* no longer used... */
+	unsigned int	closing_wait; /* time to wait before closing */
+	unsigned int	closing_wait2; /* no longer used... */
 	unsigned char	*iomem_base;
 	unsigned short	iomem_reg_shift;
 	unsigned int	port_high;
--- linux-2.6.11.11/include/linux/serialP.h	2004-08-14 12:54:49 +0200
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/serialP.h	2005-06-01 14:34:17 +0200
@@ -42,8 +42,8 @@ struct serial_state {
 	int	count;
 	u8	*iomem_base;
 	u16	iomem_reg_shift;
-	unsigned short	close_delay;
-	unsigned short	closing_wait; /* time to wait before closing */
+	unsigned int	close_delay;
+	unsigned int	closing_wait; /* time to wait before closing */
 	struct async_icount	icount;	
 	int	io_type;
 	struct async_struct *info;
--- linux-2.6.11.11/include/linux/serialP.h	2004-08-14 12:54:49 +0200
+++ linux-2.6.11.11-vs2.0-rc3/include/linux/serialP.h	2005-06-01 14:34:17 +0200
@@ -64,8 +64,8 @@ struct async_struct {
 	int			quot;
 	int			x_char;	/* xon/xoff character */
 	int			close_delay;
-	unsigned short		closing_wait;
-	unsigned short		closing_wait2; /* obsolete */
+	unsigned int		closing_wait;
+	unsigned int		closing_wait2; /* obsolete */
 	int			IER; 	/* Interrupt Enable Register */
 	int			MCR; 	/* Modem control register */
 	int			LCR; 	/* Line control register */
--- linux-2.6.11.11/include/net/irda/ircomm_tty.h	2005-03-02 12:38:54 +0100
+++ linux-2.6.11.11-vs2.0-rc3/include/net/irda/ircomm_tty.h	2005-06-01 14:34:17 +0200
@@ -102,8 +102,8 @@ struct ircomm_tty_cb {
 	struct timer_list watchdog_timer;
 	struct work_struct  tqueue;
 
-        unsigned short    close_delay;
-        unsigned short    closing_wait; /* time to wait before closing */
+	unsigned int      close_delay;
+	unsigned int      closing_wait; /* time to wait before closing */
 
 	int  open_count;
 	int  blocked_open;	/* # of blocked opens */
--- linux-2.6.11.11/include/net/tcp.h	2005-03-02 12:38:54 +0100
+++ linux-2.6.11.11-vs2.0-rc3/include/net/tcp.h	2005-06-01 14:34:17 +0200
@@ -485,8 +489,8 @@ static __inline__ int tcp_sk_listen_hash
    so that we select tick to get range about 4 seconds.
  */
 
-#if HZ <= 16 || HZ > 4096
-# error Unsupported: HZ <= 16 or HZ > 4096
+#if HZ <= 16 || HZ > 32768
+# error Unsupported: HZ <= 16 or HZ > 32768
 #elif HZ <= 32
 # define TCP_TW_RECYCLE_TICK (5+2-TCP_TW_RECYCLE_SLOTS_LOG)
 #elif HZ <= 64
--- linux-2.6.11.11/include/net/tcp.h	2005-03-02 12:38:54 +0100
+++ linux-2.6.11.11-vs2.0-rc3/include/net/tcp.h	2005-06-01 14:34:17 +0200
@@ -501,8 +505,14 @@ static __inline__ int tcp_sk_listen_hash
 # define TCP_TW_RECYCLE_TICK (10+2-TCP_TW_RECYCLE_SLOTS_LOG)
 #elif HZ <= 2048
 # define TCP_TW_RECYCLE_TICK (11+2-TCP_TW_RECYCLE_SLOTS_LOG)
-#else
+#elif HZ <= 4096
 # define TCP_TW_RECYCLE_TICK (12+2-TCP_TW_RECYCLE_SLOTS_LOG)
+#elif HZ <= 8192
+# define TCP_TW_RECYCLE_TICK (13+2-TCP_TW_RECYCLE_SLOTS_LOG)
+#elif HZ <= 16384
+# define TCP_TW_RECYCLE_TICK (14+2-TCP_TW_RECYCLE_SLOTS_LOG)
+#else
+# define TCP_TW_RECYCLE_TICK (15+2-TCP_TW_RECYCLE_SLOTS_LOG)
 #endif
 
 #define BICTCP_BETA_SCALE    1024	/* Scale factor beta calculation
--- linux-2.6.11.11/init/calibrate.c	2005-03-02 12:39:08 +0100
+++ linux-2.6.11.11-vs2.0-rc3/init/calibrate.c	2005-06-01 14:34:17 +0200
@@ -33,8 +33,8 @@ void __devinit calibrate_delay(void)
 		loops_per_jiffy = preset_lpj;
 		printk("Calibrating delay loop (skipped)... "
 			"%lu.%02lu BogoMIPS preset\n",
-			loops_per_jiffy/(500000/HZ),
-			(loops_per_jiffy/(5000/HZ)) % 100);
+			HZ*(loops_per_jiffy >> 3)/62500,
+			(HZ*(loops_per_jiffy >> 3)/625) % 100);
 	} else {
 		loops_per_jiffy = (1<<12);
 
--- linux-2.6.11.11/init/calibrate.c	2005-03-02 12:39:08 +0100
+++ linux-2.6.11.11-vs2.0-rc3/init/calibrate.c	2005-06-01 14:34:17 +0200
@@ -71,8 +71,8 @@ void __devinit calibrate_delay(void)
 
 		/* Round the value and print it */
 		printk("%lu.%02lu BogoMIPS (lpj=%lu)\n",
-			loops_per_jiffy/(500000/HZ),
-			(loops_per_jiffy/(5000/HZ)) % 100,
+			HZ*(loops_per_jiffy >> 3)/62500,
+			(HZ*(loops_per_jiffy >> 3)/625) % 100,
 			loops_per_jiffy);
 	}
 
--- linux-2.6.11.11/kernel/timer.c	2005-03-02 12:39:08 +0100
+++ linux-2.6.11.11-vs2.0-rc3/kernel/timer.c	2005-06-01 14:34:17 +0200
@@ -684,7 +686,11 @@ static void second_overflow(void)
 	if (ltemp > (MAXPHASE / MINSEC) << SHIFT_UPDATE)
 	    ltemp = (MAXPHASE / MINSEC) << SHIFT_UPDATE;
 	time_offset += ltemp;
+	#if SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE > 0
 	time_adj = -ltemp << (SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE);
+	#else
+	time_adj = -ltemp >> (SHIFT_HZ + SHIFT_UPDATE - SHIFT_SCALE);
+	#endif
     } else {
 	ltemp = time_offset;
 	if (!(time_status & STA_FLL))
--- linux-2.6.11.11/kernel/timer.c	2005-03-02 12:39:08 +0100
+++ linux-2.6.11.11-vs2.0-rc3/kernel/timer.c	2005-06-01 14:34:17 +0200
@@ -692,7 +698,11 @@ static void second_overflow(void)
 	if (ltemp > (MAXPHASE / MINSEC) << SHIFT_UPDATE)
 	    ltemp = (MAXPHASE / MINSEC) << SHIFT_UPDATE;
 	time_offset -= ltemp;
+	#if SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE > 0
 	time_adj = ltemp << (SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE);
+	#else
+	time_adj = ltemp >> (SHIFT_HZ + SHIFT_UPDATE - SHIFT_SCALE);
+	#endif
     }
 
     /*
--- linux-2.6.11.11/net/ipv4/netfilter/ip_conntrack_proto_sctp.c	2005-03-02 12:39:09 +0100
+++ linux-2.6.11.11-vs2.0-rc3/net/ipv4/netfilter/ip_conntrack_proto_sctp.c	2005-06-01 14:34:17 +0200
@@ -61,7 +61,7 @@ static const char *sctp_conntrack_names[
 static unsigned long ip_ct_sctp_timeout_closed            =  10 SECS;
 static unsigned long ip_ct_sctp_timeout_cookie_wait       =   3 SECS;
 static unsigned long ip_ct_sctp_timeout_cookie_echoed     =   3 SECS;
-static unsigned long ip_ct_sctp_timeout_established       =   5 DAYS;
+static unsigned long ip_ct_sctp_timeout_established       =   2 DAYS;
 static unsigned long ip_ct_sctp_timeout_shutdown_sent     = 300 SECS / 1000;
 static unsigned long ip_ct_sctp_timeout_shutdown_recd     = 300 SECS / 1000;
 static unsigned long ip_ct_sctp_timeout_shutdown_ack_sent =   3 SECS;
--- linux-2.6.11.11/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	2005-03-02 12:39:09 +0100
+++ linux-2.6.11.11-vs2.0-rc3/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	2005-06-01 14:34:17 +0200
@@ -88,7 +88,7 @@ static const char *tcp_conntrack_names[]
 
 unsigned long ip_ct_tcp_timeout_syn_sent =      2 MINS;
 unsigned long ip_ct_tcp_timeout_syn_recv =     60 SECS;
-unsigned long ip_ct_tcp_timeout_established =   5 DAYS;
+unsigned long ip_ct_tcp_timeout_established =   2 DAYS;
 unsigned long ip_ct_tcp_timeout_fin_wait =      2 MINS;
 unsigned long ip_ct_tcp_timeout_close_wait =   60 SECS;
 unsigned long ip_ct_tcp_timeout_last_ack =     30 SECS;