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: <9521576.ePuIMg9qsX@vostro.rjw.lan>
Date:	Mon, 13 May 2013 13:38:46 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:	linux-acpi@...r.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Len Brown <lenb@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI: implement acpi_os_get_timer() according the spec

On Monday, May 13, 2013 01:27:51 PM Mika Westerberg wrote:
> ACPI Timer() opcode should return monotonically increasing clock with 100ns
> granularity. Implement this with the help of ktime_get().
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>

That looks reasobable.  Have you tested it?

Rafael


> ---
>  drivers/acpi/osl.c |   14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 586e7e9..2a22170 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -835,19 +835,7 @@ void acpi_os_stall(u32 us)
>   */
>  u64 acpi_os_get_timer(void)
>  {
> -	static u64 t;
> -
> -#ifdef	CONFIG_HPET
> -	/* TBD: use HPET if available */
> -#endif
> -
> -#ifdef	CONFIG_X86_PM_TIMER
> -	/* TBD: default to PM timer if HPET was not available */
> -#endif
> -	if (!t)
> -		printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n");
> -
> -	return ++t;
> +	return ktime_to_ns(ktime_get()) / 100;
>  }
>  
>  acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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