summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/machdep.c
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2005-02-28 09:49:00 +0000
committergrehan <grehan@FreeBSD.org>2005-02-28 09:49:00 +0000
commit2773bd509b6496590db4f9b242799e8277fd7a2c (patch)
tree83a4c747619ef113a8f8428c8fb74d9add0856b3 /sys/powerpc/aim/machdep.c
parent001881a1348184a8f6b5994444a51c57f224920e (diff)
downloadFreeBSD-src-2773bd509b6496590db4f9b242799e8277fd7a2c.zip
FreeBSD-src-2773bd509b6496590db4f9b242799e8277fd7a2c.tar.gz
Catch the case where the idle loop is entered with interrupts disabled,
causing a hard hang.
Diffstat (limited to 'sys/powerpc/aim/machdep.c')
-rw-r--r--sys/powerpc/aim/machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index a96df41..495d5da 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -735,7 +735,15 @@ cpu_halt(void)
void
cpu_idle(void)
{
- /* Insert code to halt (until next interrupt) for the idle loop */
+ /* TODO: Insert code to halt (until next interrupt) */
+
+#ifdef INVARIANTS
+ if ((mfmsr() & PSL_EE) != PSL_EE) {
+ struct thread *td = curthread;
+ printf("td crit %x\n", td->td_md.md_savecrit);
+ panic("ints disabled in idleproc!");
+ }
+#endif
}
/*
OpenPOWER on IntegriCloud