aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/isa/pmtimer.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2016-07-13 19:16:32 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2016-07-13 19:16:32 +0000
commit0aed566c32a4f697ba8a8d3f0847c0546ba004e5 (patch)
tree943d579a597870b73b9023da226e85db8a4ed18c /sys/i386/isa/pmtimer.c
parentea81c8d0efa39a88ddc215b91372c385511ca089 (diff)
Remove a tunable and always reset system clock while resuming with ACPI.
Requested by: bde (long ago)
Notes
Notes: svn path=/head/; revision=302782
Diffstat (limited to 'sys/i386/isa/pmtimer.c')
-rw-r--r--sys/i386/isa/pmtimer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/i386/isa/pmtimer.c b/sys/i386/isa/pmtimer.c
index b5a030266db0..443b57a3595c 100644
--- a/sys/i386/isa/pmtimer.c
+++ b/sys/i386/isa/pmtimer.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
+#include <sys/power.h>
#include <sys/syslog.h>
#include <machine/clock.h>
@@ -83,6 +84,9 @@ static int
pmtimer_suspend(device_t dev)
{
+ if (power_pm_get_type() == POWER_PM_TYPE_ACPI)
+ return (0);
+
microtime(&diff_time);
inittodr(0);
microtime(&suspend_time);
@@ -96,6 +100,9 @@ pmtimer_resume(device_t dev)
u_int second, minute, hour;
struct timeval resume_time, tmp_time;
+ if (power_pm_get_type() == POWER_PM_TYPE_ACPI)
+ return (0);
+
/* modified for adjkerntz */
timer_restore(); /* restore the all timers */
inittodr(0); /* adjust time to RTC */