summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2003-04-02 10:51:06 +0000
committernyan <nyan@FreeBSD.org>2003-04-02 10:51:06 +0000
commit7610c0ab6dcc3d375877f5bdd5f9fad914b9bf1e (patch)
treeab0aa2c44f7c651841877ea9e646fb3e6bbf874b /sys
parent697533b88b051cfea76388b701a453147e730edf (diff)
downloadFreeBSD-src-7610c0ab6dcc3d375877f5bdd5f9fad914b9bf1e.zip
FreeBSD-src-7610c0ab6dcc3d375877f5bdd5f9fad914b9bf1e.tar.gz
MFi386: revisions 1.556 and 1.557.
Backout revision 1.312.
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/i386/machdep.c21
-rw-r--r--sys/pc98/pc98/machdep.c21
2 files changed, 18 insertions, 24 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index ac597ff..d7ff880 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 ac597ff..d7ff880 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);
-}
-
OpenPOWER on IntegriCloud