diff options
author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2003-04-02 10:51:06 +0000 |
---|---|---|
committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2003-04-02 10:51:06 +0000 |
commit | cffa957106487a11c645e89c706546326a5de54f (patch) | |
tree | ab0aa2c44f7c651841877ea9e646fb3e6bbf874b /sys/pc98 | |
parent | ca30868b63bdcd1c1cb885261f7308025ab625ab (diff) | |
download | src-cffa957106487a11c645e89c706546326a5de54f.tar.gz src-cffa957106487a11c645e89c706546326a5de54f.zip |
MFi386: revisions 1.556 and 1.557.
Backout revision 1.312.
Notes
Notes:
svn path=/head/; revision=112975
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/i386/machdep.c | 21 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 21 |
2 files changed, 18 insertions, 24 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index ac597ff4912f..d7ff880864d7 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -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); -} - diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index ac597ff4912f..d7ff880864d7 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -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); -} - |