diff -N -P -r -u linux-2.6.10/arch/i386/kernel/cpu/proc.c linux-2.6.10-just-Hz/arch/i386/kernel/cpu/proc.c --- linux-2.6.10/arch/i386/kernel/cpu/proc.c 2004-12-24 15:35:27.000000000 -0600 +++ linux-2.6.10-just-Hz/arch/i386/kernel/cpu/proc.c 2005-07-07 15:00:16.252042432 -0500 @@ -121,8 +121,8 @@ 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; } diff -N -P -r -u linux-2.6.10/drivers/char/dtlk.c linux-2.6.10-just-Hz/drivers/char/dtlk.c --- linux-2.6.10/drivers/char/dtlk.c 2004-12-24 15:34:32.000000000 -0600 +++ linux-2.6.10-just-Hz/drivers/char/dtlk.c 2005-07-07 15:00:16.259041368 -0500 @@ -198,7 +198,7 @@ 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>>5)/125; retries++) if (inb_p(dtlk_port_tts) & TTS_WRITABLE) diff -N -P -r -u linux-2.6.10/include/linux/cyclades.h linux-2.6.10-just-Hz/include/linux/cyclades.h --- linux-2.6.10/include/linux/cyclades.h 2004-12-24 15:35:40.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/cyclades.h 2005-07-07 15:00:16.263040760 -0500 @@ -585,7 +585,7 @@ 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 */ diff -N -P -r -u linux-2.6.10/include/linux/generic_serial.h linux-2.6.10-just-Hz/include/linux/generic_serial.h --- linux-2.6.10/include/linux/generic_serial.h 2004-12-24 15:35:25.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/generic_serial.h 2005-07-07 15:00:16.263040760 -0500 @@ -42,7 +42,7 @@ 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; diff -N -P -r -u linux-2.6.10/include/linux/hayesesp.h linux-2.6.10-just-Hz/include/linux/hayesesp.h --- linux-2.6.10/include/linux/hayesesp.h 2004-12-24 15:35:24.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/hayesesp.h 2005-07-07 15:00:16.262040912 -0500 @@ -87,8 +87,8 @@ 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; diff -N -P -r -u linux-2.6.10/include/linux/isicom.h linux-2.6.10-just-Hz/include/linux/isicom.h --- linux-2.6.10/include/linux/isicom.h 2004-12-24 15:34:31.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/isicom.h 2005-07-07 15:00:16.260041216 -0500 @@ -145,7 +145,7 @@ 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; diff -N -P -r -u linux-2.6.10/include/linux/jiffies.h linux-2.6.10-just-Hz/include/linux/jiffies.h --- linux-2.6.10/include/linux/jiffies.h 2004-12-24 15:33:49.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/jiffies.h 2005-07-07 15:03:31.200405776 -0500 @@ -38,6 +38,20 @@ # 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 +#elif HZ >= 24576 && HZ < 49152 +# define SHIFT_HZ 15 +#elif HZ >= 49152 && HZ < 98304 +# define SHIFT_HZ 16 +#elif HZ >= 98304 && HZ < 196608 +# define SHIFT_HZ 17 #else # error You lose. #endif diff -N -P -r -u linux-2.6.10/include/linux/serial.h linux-2.6.10-just-Hz/include/linux/serial.h --- linux-2.6.10/include/linux/serial.h 2004-12-24 15:34:26.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/serial.h 2005-07-07 15:00:16.270039696 -0500 @@ -39,12 +39,12 @@ 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; diff -N -P -r -u linux-2.6.10/include/linux/serialP.h linux-2.6.10-just-Hz/include/linux/serialP.h --- linux-2.6.10/include/linux/serialP.h 2004-12-24 15:33:52.000000000 -0600 +++ linux-2.6.10-just-Hz/include/linux/serialP.h 2005-07-07 15:00:16.266040304 -0500 @@ -42,8 +42,8 @@ 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; @@ -64,8 +64,8 @@ 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 */ diff -N -P -r -u linux-2.6.10/include/net/irda/ircomm_tty.h linux-2.6.10-just-Hz/include/net/irda/ircomm_tty.h --- linux-2.6.10/include/net/irda/ircomm_tty.h 2004-12-24 15:34:32.000000000 -0600 +++ linux-2.6.10-just-Hz/include/net/irda/ircomm_tty.h 2005-07-07 15:00:16.269039848 -0500 @@ -102,8 +102,8 @@ 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 */ diff -N -P -r -u linux-2.6.10/include/net/tcp.h linux-2.6.10-just-Hz/include/net/tcp.h --- linux-2.6.10/include/net/tcp.h 2004-12-24 15:34:00.000000000 -0600 +++ linux-2.6.10-just-Hz/include/net/tcp.h 2005-07-07 15:01:35.332020448 -0500 @@ -486,8 +486,8 @@ 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 > 131072 +# error Unsupported: HZ <= 16 or HZ > 131072 #elif HZ <= 32 # define TCP_TW_RECYCLE_TICK (5+2-TCP_TW_RECYCLE_SLOTS_LOG) #elif HZ <= 64 @@ -502,8 +502,18 @@ # 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) +#elif HZ <= 32768 +# define TCP_TW_RECYCLE_TICK (15+2-TCP_TW_RECYCLE_SLOTS_LOG) +#elif HZ <= 65536 +# define TCP_TW_RECYCLE_TICK (16+2-TCP_TW_RECYCLE_SLOTS_LOG) +#else +# define TCP_TW_RECYCLE_TICK (17+2-TCP_TW_RECYCLE_SLOTS_LOG) #endif #define BICTCP_1_OVER_BETA 8 /* diff -N -P -r -u linux-2.6.10/init/main.c linux-2.6.10-just-Hz/init/main.c --- linux-2.6.10/init/main.c 2004-12-24 15:34:01.000000000 -0600 +++ linux-2.6.10-just-Hz/init/main.c 2005-07-07 15:02:33.525173744 -0500 @@ -216,8 +216,8 @@ 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); @@ -254,8 +254,8 @@ /* 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); } diff -N -P -r -u linux-2.6.10/kernel/timer.c linux-2.6.10-just-Hz/kernel/timer.c --- linux-2.6.10/kernel/timer.c 2004-12-24 15:35:24.000000000 -0600 +++ linux-2.6.10-just-Hz/kernel/timer.c 2005-07-07 15:00:16.254042128 -0500 @@ -677,7 +677,11 @@ if (ltemp > (MAXPHASE / MINSEC) << SHIFT_UPDATE) ltemp = (MAXPHASE / MINSEC) << SHIFT_UPDATE; time_offset += ltemp; - time_adj = -ltemp << (SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE); +#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)) @@ -685,7 +689,11 @@ if (ltemp > (MAXPHASE / MINSEC) << SHIFT_UPDATE) ltemp = (MAXPHASE / MINSEC) << SHIFT_UPDATE; time_offset -= ltemp; - time_adj = ltemp << (SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE); +#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 } /*