MFi386: revisions 1.556 and 1.557.

Backout revision 1.312.
This commit is contained in:
Yoshihiro Takahashi 2003-04-02 10:51:06 +00:00
parent ca30868b63
commit cffa957106
2 changed files with 18 additions and 24 deletions

View File

@ -1028,12 +1028,11 @@ cpu_halt(void)
* XXX we need to have a cpu mask of idle cpus and generate an IPI or
* otherwise generate some sort of interrupt to wake up cpus sitting in HLT.
* Then we can have our cake and eat it too.
*
* XXX I'm turning it on for SMP as well by default for now. It seems to
* help lock contention somewhat, and this is critical for HTT. -Peter
*/
#ifdef SMP
static int cpu_idle_hlt = 0;
#else
static int cpu_idle_hlt = 1;
#endif
SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
&cpu_idle_hlt, 0, "Idle loop HLT enable");
@ -1046,6 +1045,12 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
void
cpu_idle(void)
{
#ifdef SMP
if (mp_grab_cpu_hlt())
return;
#endif
if (cpu_idle_hlt) {
disable_intr();
if (sched_runnable()) {
@ -2803,11 +2808,3 @@ outb(u_int port, u_char data)
}
#endif /* DDB */
intptr_t
casuptr(intptr_t *p, intptr_t old, intptr_t new)
{
return (-1);
}

View File

@ -1028,12 +1028,11 @@ cpu_halt(void)
* XXX we need to have a cpu mask of idle cpus and generate an IPI or
* otherwise generate some sort of interrupt to wake up cpus sitting in HLT.
* Then we can have our cake and eat it too.
*
* XXX I'm turning it on for SMP as well by default for now. It seems to
* help lock contention somewhat, and this is critical for HTT. -Peter
*/
#ifdef SMP
static int cpu_idle_hlt = 0;
#else
static int cpu_idle_hlt = 1;
#endif
SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
&cpu_idle_hlt, 0, "Idle loop HLT enable");
@ -1046,6 +1045,12 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
void
cpu_idle(void)
{
#ifdef SMP
if (mp_grab_cpu_hlt())
return;
#endif
if (cpu_idle_hlt) {
disable_intr();
if (sched_runnable()) {
@ -2803,11 +2808,3 @@ outb(u_int port, u_char data)
}
#endif /* DDB */
intptr_t
casuptr(intptr_t *p, intptr_t old, intptr_t new)
{
return (-1);
}