summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2014-09-25 21:45:54 +0000
committerkettenis <kettenis@openbsd.org>2014-09-25 21:45:54 +0000
commit46f8105f2e5d9c9be3d5de3a0032f7e786e10af9 (patch)
tree0cc7052f519ae02e2a6b15062f0973fc0c8422cb
parentSupport using pane id as part of session or window specifier (so %1 (diff)
downloadwireguard-openbsd-46f8105f2e5d9c9be3d5de3a0032f7e786e10af9.tar.xz
wireguard-openbsd-46f8105f2e5d9c9be3d5de3a0032f7e786e10af9.zip
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@
-rw-r--r--sys/dev/acpi/acpi.c8
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);