This makes DELTA and GET_TIME in drivers/input/gameport/gameport.c
similar to the ones in drivers/input/joystick/analog.c . Worked on
2.6.22-rc4-git2.
Signed-off-by: Miltiadis Margaronis <mmargaron@gmail.com>
--- a/drivers/input/gameport/gameport.c 2007-06-05 03:57:02.000000000 +0300
+++ b/drivers/input/gameport/gameport.c 2007-06-09 07:20:45.000000000 +0300
@@ -64,8 +64,8 @@ static void gameport_disconnect_port(str
#include <asm/i8253.h>
-#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0))
-#define GET_TIME(x) do { x = get_time_pit(); } while (0)
+#define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((y) - (x) +((y) < (x) ? CLOCK_TICK_RATE / HZ : 0)))
+#define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
static unsigned int get_time_pit(void)
{
--
Miltos
-
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 007/196] Chinese: add translation of stable_kernel_rules.txt |
| Andrew Morton | -mm merge plans for 2.6.23 |
git: | |
| David Miller | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
