diff options
author | 2013-12-16 19:11:52 +0000 | |
---|---|---|
committer | 2013-12-16 19:11:52 +0000 | |
commit | b0e395703863b7d1e8bbe634b4bd577a500d7b49 (patch) | |
tree | daf3deb5dc1b3b6de693a45ca162ea8002c334a5 | |
parent | Restore TIOCGSID ioctl that was removed along with the 4.3BSD tty(4) (diff) | |
download | wireguard-openbsd-b0e395703863b7d1e8bbe634b4bd577a500d7b49.tar.xz wireguard-openbsd-b0e395703863b7d1e8bbe634b4bd577a500d7b49.zip |
Restore hw.setperf upon resume like we do for apm(4) on i386. Seems we need
to do this fairly late in the resume to avoid hangs.
ok deraadt@, mlarkin@
-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 6281c754d61..e4d428144b9 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.248 2013/12/06 21:03:02 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.249 2013/12/16 19:11:52 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -30,6 +30,7 @@ #include <sys/workq.h> #include <sys/sched.h> #include <sys/reboot.h> +#include <sys/sysctl.h> #ifdef HIBERNATE #include <sys/hibernate.h> @@ -2084,6 +2085,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; @@ -2184,6 +2186,10 @@ fail_quiesce: wsdisplay_resume(); #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); fail_tts: |