Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/i386/i386 Pull up revisions 1.53, 1.56 (request...
details: https://anonhg.NetBSD.org/src/rev/2285d34288a6
branches: netbsd-1-5
changeset: 491639:2285d34288a6
user: he <he%NetBSD.org@localhost>
date: Sun May 06 15:03:46 2001 +0000
description:
Pull up revisions 1.53,1.56 (requested by he):
Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
diffstat:
sys/arch/i386/i386/apm.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (52 lines):
diff -r eb32995285c9 -r 2285d34288a6 sys/arch/i386/i386/apm.c
--- a/sys/arch/i386/i386/apm.c Sun May 06 14:44:49 2001 +0000
+++ b/sys/arch/i386/i386/apm.c Sun May 06 15:03:46 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apm.c,v 1.50.2.3 2001/02/04 18:40:22 he Exp $ */
+/* $NetBSD: apm.c,v 1.50.2.4 2001/05/06 15:03:46 he Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -228,6 +228,8 @@
*/
int apm_standby_pending, apm_suspend_pending;
+static int apm_spl; /* saved spl while suspended */
+
#ifdef APMDEBUG
int apmcall_debug(int, struct bioscallregs *, int);
static void acallpr(int, char *, struct bioscallregs *);
@@ -511,6 +513,10 @@
}
sc->sc_power_state = PWR_SUSPEND;
+ dopowerhooks(PWR_SOFTSUSPEND);
+
+ apm_spl = splhigh();
+
dopowerhooks(PWR_SUSPEND);
/* XXX cgd */
@@ -531,6 +537,10 @@
}
sc->sc_power_state = PWR_STANDBY;
+ dopowerhooks(PWR_SOFTSTANDBY);
+
+ apm_spl = splhigh();
+
dopowerhooks(PWR_STANDBY);
/* XXX cgd */
@@ -559,6 +569,11 @@
inittodr(time.tv_sec);
dopowerhooks(PWR_RESUME);
+
+ splx(apm_spl);
+
+ dopowerhooks(PWR_SOFTRESUME);
+
apm_record_event(sc, regs->BX);
}
Home |
Main Index |
Thread Index |
Old Index