mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-acpi@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <lenb@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: implement acpi_os_get_timer() according the spec
Date: Mon, 13 May 2013 13:38:46 +0200	[thread overview]
Message-ID: <9521576.ePuIMg9qsX@vostro.rjw.lan> (raw)
In-Reply-To: <1368440871-27552-1-git-send-email-mika.westerberg@linux.intel.com>

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@linux.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.

  reply	other threads:[~2013-05-13 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 10:27 Mika Westerberg
2013-05-13 11:38 ` Rafael J. Wysocki [this message]
2013-05-13 11:44   ` Mika Westerberg
2013-05-20 10:25     ` Mika Westerberg
2013-05-20 11:07       ` Rafael J. Wysocki
2013-05-20 11:28         ` [PATCH v2] " Mika Westerberg
2013-05-23  7:27           ` [PATCH v3] " Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9521576.ePuIMg9qsX@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome