svn commit: r225892 - head/sys/mips/mips
Adrian Chadd
adrian at FreeBSD.org
Sat Oct 1 05:56:26 UTC 2011
Author: adrian
Date: Sat Oct 1 05:56:25 2011
New Revision: 225892
URL: http://svn.freebsd.org/changeset/base/225892
Log:
Disable using wait in cpu_idle() until a better solution to timer and
interrupt handling can be implemented.
Modified:
head/sys/mips/mips/machdep.c
Modified: head/sys/mips/mips/machdep.c
==============================================================================
--- head/sys/mips/mips/machdep.c Sat Oct 1 00:31:30 2011 (r225891)
+++ head/sys/mips/mips/machdep.c Sat Oct 1 05:56:25 2011 (r225892)
@@ -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
More information about the svn-src-head
mailing list