summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-10-01 05:56:25 +0000
committeradrian <adrian@FreeBSD.org>2011-10-01 05:56:25 +0000
commit373e645211c856b5fa7f92403e2afd1bee83d879 (patch)
treeb3bf66af75664ee538c0371a409f4ad993c69427 /sys/mips
parente7b8707889cd9e6ca8956bb963fd977166909c71 (diff)
downloadFreeBSD-src-373e645211c856b5fa7f92403e2afd1bee83d879.zip
FreeBSD-src-373e645211c856b5fa7f92403e2afd1bee83d879.tar.gz
Disable using wait in cpu_idle() until a better solution to timer and
interrupt handling can be implemented.
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/mips/machdep.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c
index f7e5248..e348e41 100644
--- a/sys/mips/mips/machdep.c
+++ b/sys/mips/mips/machdep.c
@@ -485,9 +485,24 @@ spinlock_exit(void)
/*
* call platform specific code to halt (until next interrupt) for the idle loop
*/
+/*
+ * This is disabled because of three issues:
+ *
+ * + By calling critical_enter(), any interrupt which occurs after that but
+ * before the wait instruction will be handled but not serviced (in the case
+ * of a netisr) because preemption is not allowed at this point;
+ * + Any fast interrupt handler which schedules an immediate or fast callout
+ * will not occur until the wait instruction is interrupted, as the clock
+ * has already been set by cpu_idleclock();
+ * + There is currently no known way to atomically enable interrupts and call
+ * wait, which is how the i386/amd64 code gets around (1). Thus even if
+ * interrupts were disabled and reenabled just before the wait call, any
+ * interrupt that did occur may not interrupt wait.
+ */
void
cpu_idle(int busy)
{
+#if 0
KASSERT((mips_rd_status() & MIPS_SR_INT_IE) != 0,
("interrupts disabled in idle process."));
KASSERT((mips_rd_status() & MIPS_INT_MASK) != 0,
@@ -502,6 +517,7 @@ cpu_idle(int busy)
cpu_activeclock();
critical_exit();
}
+#endif
}
int
OpenPOWER on IntegriCloud