[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#503029: False joystick events while high cpu load



tags 366507 + upstream
tags 503029 + upstream
found 503029 linux-2.6/3.1.8-2
quit

Radek Warowny wrote:

> I have recognized the problem I think. The issue occurs when you have
> cpu frequency scaling function activated. It appears when CPU was set
> to different frequency while inserting analog driver and different
> while reading joystick data (for example running a game).
>
> I think the problem is located in analog kernel driver and is related
> to usage of rdtscl() function to read time (in GET_TIME macro). This
> function returns number of clock ticks, not real time.

Yes.

>From upstream (copying here since now we have learned kernel bugzilla
cannot always be counted on to be accessible):

|               If you are interested in fixing it, I think your best
| bet is writing a patch.  If you make progress and then get stuck or
| want review, Vojtech Pavlik (the author) might still be reachable
| from <vojtech@suse.cz>; hopefully chapter 7 ("Time, Delays, and
| Deferred Work") of Linux Device Drivers at http://lwn.net/Kernel/LDD3/
| would be helpful for getting vaguely acquainted with the facilities
| available.

This might be a fun kernel patch to write for someone with the
appropriate hardware.  See drivers/input/joystick/analog.c, plus
drivers/input/gameport/gameport.c for a related bug of the same kind.



Reply to: