Date: Wed, 13 Jul 2016 19:16:32 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302782 - in head/sys: dev/acpica i386/isa Message-ID: <201607131916.u6DJGWtq012089@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Jul 13 19:16:32 2016 New Revision: 302782 URL: https://svnweb.freebsd.org/changeset/base/302782 Log: Remove a tunable and always reset system clock while resuming with ACPI. Requested by: bde (long ago) Modified: head/sys/dev/acpica/acpi.c head/sys/i386/isa/pmtimer.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Wed Jul 13 19:02:59 2016 (r302781) +++ head/sys/dev/acpica/acpi.c Wed Jul 13 19:16:32 2016 (r302782) @@ -280,14 +280,6 @@ TUNABLE_INT("debug.acpi.default_register SYSCTL_INT(_debug_acpi, OID_AUTO, default_register_width, CTLFLAG_RDTUN, &acpi_ignore_reg_width, 1, "Ignore register widths set by FADT"); -#ifdef __amd64__ -/* Reset system clock while resuming. XXX Remove once tested. */ -static int acpi_reset_clock = 1; -TUNABLE_INT("debug.acpi.reset_clock", &acpi_reset_clock); -SYSCTL_INT(_debug_acpi, OID_AUTO, reset_clock, CTLFLAG_RW, - &acpi_reset_clock, 1, "Reset system clock while resuming."); -#endif - /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); @@ -3027,9 +3019,6 @@ backout: static void acpi_resync_clock(struct acpi_softc *sc) { -#ifdef __amd64__ - if (!acpi_reset_clock) - return; /* * Warm up timecounter again and reset system clock. @@ -3037,7 +3026,6 @@ acpi_resync_clock(struct acpi_softc *sc) (void)timecounter->tc_get_timecount(timecounter); (void)timecounter->tc_get_timecount(timecounter); inittodr(time_second + sc->acpi_sleep_delay); -#endif } /* Enable or disable the device's wake GPE. */ Modified: head/sys/i386/isa/pmtimer.c ============================================================================== --- head/sys/i386/isa/pmtimer.c Wed Jul 13 19:02:59 2016 (r302781) +++ head/sys/i386/isa/pmtimer.c Wed Jul 13 19:16:32 2016 (r302782) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607131916.u6DJGWtq012089>