lkml.org 
[lkml]   [2015]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 11/18] drivers/input/gameport: Replace rdtscl() with native_read_tsc()
    Date
    It's unclear to me why this code exists in the first place.

    Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Cc: linux-input@vger.kernel.org
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    ---
    drivers/input/gameport/gameport.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
    index e853a2134680..abc0cb22e750 100644
    --- a/drivers/input/gameport/gameport.c
    +++ b/drivers/input/gameport/gameport.c
    @@ -149,9 +149,9 @@ static int old_gameport_measure_speed(struct gameport *gameport)

    for(i = 0; i < 50; i++) {
    local_irq_save(flags);
    - rdtscl(t1);
    + t1 = native_read_tsc();
    for (t = 0; t < 50; t++) gameport_read(gameport);
    - rdtscl(t2);
    + t2 = native_read_tsc();
    local_irq_restore(flags);
    udelay(i * 10);
    if (t2 - t1 < tx) tx = t2 - t1;
    --
    2.4.2


    \
     
     \ /
      Last update: 2015-06-17 03:01    [W:9.100 / U:0.340 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site