summaryrefslogtreecommitdiffstats
path: root/sys/i386/apm/apm.c
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-03-12 21:51:58 +0000
committernate <nate@FreeBSD.org>1996-03-12 21:51:58 +0000
commit069131e0ec061e22b1313bac319682c82ff1d9f2 (patch)
tree6969917d81ad2e988ad323af53bd50202f659d50 /sys/i386/apm/apm.c
parent98925de78d269beeb7af25b3bd2395c489cfdb97 (diff)
downloadFreeBSD-src-069131e0ec061e22b1313bac319682c82ff1d9f2.zip
FreeBSD-src-069131e0ec061e22b1313bac319682c82ff1d9f2.tar.gz
Removed more APM_SLOWSTART code and re-enabled some functions which
didn't require APM_SLOWSTART to be defined.
Diffstat (limited to 'sys/i386/apm/apm.c')
-rw-r--r--sys/i386/apm/apm.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 9d039b1..5a82320 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.24 1996/03/11 06:48:48 nate Exp $
+ * $Id: apm.c,v 1.25 1996/03/12 06:09:34 nate Exp $
*/
#include "apm.h"
@@ -62,12 +62,6 @@ struct apm_softc {
static struct apm_softc apm_softc[NAPM];
static struct apm_softc *master_softc = NULL; /* XXX */
static struct apmhook *hook[NAPM_HOOK]; /* XXX */
-#ifdef APM_SLOWSTART
-int apm_slowstart = 0;
-int apm_ss_cnt = 0;
-static int apm_slowstart_p = 0;
-int apm_slowstart_stat = 0;
-#endif /* APM_SLOWSTART */
#define is_enabled(foo) ((foo) ? "enabled" : "disabled")
@@ -471,7 +465,6 @@ apm_get_info(struct apm_softc *sc, apm_info_t aip)
}
-#ifdef APM_SLOWSTART
/* inform APM BIOS that CPU is idle */
void
apm_cpu_idle(void)
@@ -493,19 +486,11 @@ apm_cpu_idle(void)
* "hlt" operation from swtch() and managed it under
* APM driver.
*/
- /*
- * UKAI Note: on NetBSD, idle() called from cpu_switch()
- * doesn't halt CPU, so halt_cpu may not need on NetBSD/i386
- * or only "sti" operation would be needed.
- */
-
if (!sc->active || sc->halt_cpu) {
__asm("sti ; hlt"); /* wait for interrupt */
}
}
-#endif /* APM_SLOWSTART */
-#if APM_SLOWSTART > 0
/* inform APM BIOS that CPU is busy */
void
apm_cpu_busy(void)
@@ -516,7 +501,6 @@ apm_cpu_busy(void)
__asm("movw $0x5306, %ax; lcall _apm_addr");
}
}
-#endif /* APM_SLOWSTART > 0 */
/*
@@ -567,9 +551,6 @@ apm_halt_cpu(struct apm_softc *sc)
if (sc->initialized) {
sc->halt_cpu = 1;
}
-#ifdef APM_SLOWSTART
- apm_slowstart = 0;
-#endif /* APM_SLOWSTART */
}
/* don't halt CPU in scheduling loop */
@@ -579,9 +560,6 @@ apm_not_halt_cpu(struct apm_softc *sc)
if (sc->initialized) {
sc->halt_cpu = 0;
}
-#ifdef APM_SLOWSTART
- apm_slowstart = apm_slowstart_p;
-#endif /* APM_SLOWSTART */
}
/* device driver definitions */
@@ -734,12 +712,6 @@ apmattach(struct isa_device *dvp)
sc->disabled = ((apm_flags & APM_DISABLED) != 0);
sc->disengaged = ((apm_flags & APM_DISENGAGED) != 0);
-#ifdef APM_SLOWSTART
- if (sc->idle_cpu) {
- apm_slowstart = apm_slowstart_p = 1;
- }
-#endif
-
/* print bootstrap messages */
#ifdef APM_DEBUG
printf(" found APM BIOS version %04x\n", apm_version);
OpenPOWER on IntegriCloud