Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Sat, 14 Jun 2003 22:42:53 +0200 | From | Vojtech Pavlik <> | Subject | [patch] input: Fix CLOCK_TICK_RATE usage ... [8/13] |
| |
You can pull this changeset from: bk://kernel.bkbits.net/vojtech/input
===================================================================
ChangeSet@1.1215.104.25, 2003-06-09 14:41:31+02:00, vojtech@suse.cz input: Change input/misc/pcspkr.c to use CLOCK_TICK_RATE instead of a fixed value of 1193182. And change CLOCK_TICK_RATE and several usages of a fixed value 1193180 to a slightly more correct value of 1193182. (True freq is 1.193181818181...).
drivers/char/vt_ioctl.c | 4 ++-- drivers/input/gameport/gameport.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/misc/pcspkr.c | 2 +- include/asm-i386/timex.h | 2 +- include/asm-x86_64/timex.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-)
===================================================================
diff -Nru a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c --- a/drivers/char/vt_ioctl.c Sat Jun 14 22:23:32 2003 +++ b/drivers/char/vt_ioctl.c Sat Jun 14 22:23:32 2003 @@ -395,7 +395,7 @@ if (!perm) return -EPERM; if (arg) - arg = 1193180 / arg; + arg = 1193182 / arg; kd_mksound(arg, 0); return 0; @@ -412,7 +412,7 @@ ticks = HZ * ((arg >> 16) & 0xffff) / 1000; count = ticks ? (arg & 0xffff) : 0; if (count) - count = 1193180 / count; + count = 1193182 / count; kd_mksound(count, ticks); return 0; } diff -Nru a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c --- a/drivers/input/gameport/gameport.c Sat Jun 14 22:23:32 2003 +++ b/drivers/input/gameport/gameport.c Sat Jun 14 22:23:32 2003 @@ -37,7 +37,7 @@ #ifdef __i386__ -#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193180/HZ:0)) +#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) #define GET_TIME(x) do { x = get_time_pit(); } while (0) static unsigned int get_time_pit(void) diff -Nru a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c --- a/drivers/input/joystick/analog.c Sat Jun 14 22:23:32 2003 +++ b/drivers/input/joystick/analog.c Sat Jun 14 22:23:32 2003 @@ -138,7 +138,7 @@ #ifdef __i386__ #define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) -#define DELTA(x,y) (cpu_has_tsc?((y)-(x)):((x)-(y)+((x)<(y)?1193180L/HZ:0))) +#define DELTA(x,y) (cpu_has_tsc?((y)-(x)):((x)-(y)+((x)<(y)?1193182L/HZ:0))) #define TIME_NAME (cpu_has_tsc?"TSC":"PIT") static unsigned int get_time_pit(void) { diff -Nru a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c --- a/drivers/input/misc/pcspkr.c Sat Jun 14 22:23:32 2003 +++ b/drivers/input/misc/pcspkr.c Sat Jun 14 22:23:32 2003 @@ -43,7 +43,7 @@ } if (value > 20 && value < 32767) - count = 1193182 / value; + count = CLOCK_TICK_RATE / value; spin_lock_irqsave(&i8253_beep_lock, flags); diff -Nru a/include/asm-i386/timex.h b/include/asm-i386/timex.h --- a/include/asm-i386/timex.h Sat Jun 14 22:23:32 2003 +++ b/include/asm-i386/timex.h Sat Jun 14 22:23:32 2003 @@ -15,7 +15,7 @@ #ifdef CONFIG_MELAN # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ #else -# define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ +# define CLOCK_TICK_RATE 1193182 /* Underlying HZ */ #endif #endif diff -Nru a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h --- a/include/asm-x86_64/timex.h Sat Jun 14 22:23:32 2003 +++ b/include/asm-x86_64/timex.h Sat Jun 14 22:23:32 2003 @@ -10,7 +10,7 @@ #include <asm/msr.h> #include <asm/vsyscall.h> -#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ +#define CLOCK_TICK_RATE 1193182 /* Underlying HZ */ #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ #define FINETUNE ((((((int)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \ (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |