lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150616230425.GD17610@dtor-ws>
Date:	Tue, 16 Jun 2015 16:04:25 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Andy Lutomirski <luto@...nel.org>
Cc:	x86@...nel.org, Borislav Petkov <bp@...e.de>,
	Peter Zijlstra <peterz@...radead.org>,
	John Stultz <john.stultz@...aro.org>,
	linux-kernel@...r.kernel.org, Len Brown <lenb@...nel.org>,
	Huang Rui <ray.huang@....com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	linux-input@...r.kernel.org
Subject: Re: [PATCH v2 11/17] drivers/input/gameport: Replace rdtscl() with
 native_read_tsc()

On Fri, Jun 12, 2015 at 04:44:51PM -0700, Andy Lutomirski wrote:
> It's unclear to me why this code exists in the first place.
> 
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Cc: linux-input@...r.kernel.org
> Signed-off-by: Andy Lutomirski <luto@...nel.org>

Acked-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

> ---
>  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
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ