diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-09-25 21:45:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-09-25 21:45:55 +0000 |
commit | ce9b71b8d447abdc467057798d7649fcd9d9fb20 (patch) | |
tree | bc227e3f1b1a80e5fe28067e872a8cdc9b4e4dfc /sys/dev/acpi/acpi.c | |
parent | 7252d52f2d307ec1d2791049c8585a0ef75ae8c2 (diff) |
Bring back rev 1.249. Now that mp_setperf() has been fixed, it should be
safe to restore perflevel when resuming. Should fix the issues people
see with the processor running at full speed heating up the machine while
the apm command reports that the CPUs are running at a low speed.
ok dcoppa@, deraadt@
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r-- | sys/dev/acpi/acpi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 0c67985e753..9b8e5251b92 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.270 2014/09/23 18:33:34 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.271 2014/09/25 21:45:54 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -29,6 +29,7 @@ #include <sys/kthread.h> #include <sys/sched.h> #include <sys/reboot.h> +#include <sys/sysctl.h> #ifdef HIBERNATE #include <sys/hibernate.h> @@ -2110,6 +2111,7 @@ acpi_indicator(struct acpi_softc *sc, int led_state) int acpi_sleep_state(struct acpi_softc *sc, int state) { + extern int perflevel; int error = ENXIO; int s; @@ -2233,6 +2235,10 @@ fail_quiesce: rw_enter_write(&sc->sc_lck); #endif /* NWSDISPLAY > 0 */ + /* Restore hw.setperf */ + if (cpu_setperf != NULL) + cpu_setperf(perflevel); + acpi_record_event(sc, APM_NORMAL_RESUME); acpi_indicator(sc, ACPI_SST_WORKING); |