summaryrefslogtreecommitdiffstats
path: root/sys/i386/i386/machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/i386/machdep.c')
-rw-r--r--sys/i386/i386/machdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 2ec8d1c..2f11ee2 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -780,7 +780,11 @@ cpu_halt(void)
* the !SMP case, as there is no clean way to ensure that a CPU will be
* woken when there is work available for it.
*/
+#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");
@@ -793,7 +797,6 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW,
void
cpu_idle(void)
{
-#ifndef SMP
if (cpu_idle_hlt) {
disable_intr();
if (procrunnable()) {
@@ -807,7 +810,6 @@ cpu_idle(void)
__asm __volatile("sti; hlt");
}
}
-#endif
}
/*
OpenPOWER on IntegriCloud