1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Removed more APM_SLOWSTART code and re-enabled some functions which

didn't require APM_SLOWSTART to be defined.
This commit is contained in:
Nate Williams 1996-03-12 21:51:58 +00:00
parent 3ba74234ae
commit e34e4a3ce0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14603
2 changed files with 2 additions and 58 deletions

View File

@ -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);

View File

@ -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);