summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-05-27 08:20:00 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-05-27 08:20:00 +0000
commit0a99ac541c9efe82ecb3093e40ca49530a202dc7 (patch)
tree93111016767b67292593c45fd03945c0fd5f20a2 /sys/arch
parent14332f808c3174e10546d505a5a7e7828c34c1f8 (diff)
apm restores perflevel after resume; some cpus are forgetful.
update cpu even with 100 -> 100 setperf changes, in case saved value has gotten out of sync. from grange@ ok deraadt@ grange@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/apm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index fe90a90dd5a..1ade5dfb400 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.61 2004/03/11 17:20:33 millert Exp $ */
+/* $OpenBSD: apm.c,v 1.62 2004/05/27 08:19:59 tedu Exp $ */
/*-
* Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
@@ -347,6 +347,8 @@ apm_resume(sc, regs)
struct apm_softc *sc;
struct apmregs *regs;
{
+ extern int perflevel;
+
apm_resumes = APM_RESUME_HOLDOFF;
/* they say that some machines may require reinitializing the clock */
@@ -359,6 +361,10 @@ apm_resume(sc, regs)
/* acknowledge any rtc interrupt we may have missed */
rtcdrain(NULL);
+
+ /* restore hw.setperf */
+ if (cpu_setperf != NULL)
+ cpu_setperf(perflevel);
}
int