summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-29 15:03:44 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-29 15:03:44 +0200
commit5c0b1b2003362c9015ee3324816c0966efaa0f88 (patch)
tree86beaa1096b91bd102752c4df5be78942857200e /drivers/acpi/osl.c
parentd5ba5b141dae17155d12b897f2eedeaf6800db7c (diff)
parent10619066a353f27fe3700a448fa2b21643687840 (diff)
downloadlinux-5c0b1b2003362c9015ee3324816c0966efaa0f88.tar.bz2
Merge branch 'acpi-assorted'
* acpi-assorted: ACPI: implement acpi_os_get_timer() according the spec
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index da6b6634e5b3..6ab2c3505520 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -835,19 +835,9 @@ 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;
+ u64 time_ns = ktime_to_ns(ktime_get());
+ do_div(time_ns, 100);
+ return time_ns;
}
acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)