svn commit: r221738 - head/sys/powerpc/powerpc
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue May 10 14:03:05 UTC 2011
Author: nwhitehorn
Date: Tue May 10 14:03:05 2011
New Revision: 221738
URL: http://svn.freebsd.org/changeset/base/221738
Log:
Only try to set up IPIs at boot on systems that actually have more than one
CPU. This fixes a panic observed on Heathrow-based systems without
SMP-capable PICs when the kernel had both options SMP and INVARIANTS.
MFC after: 5 days
Modified:
head/sys/powerpc/powerpc/intr_machdep.c
Modified: head/sys/powerpc/powerpc/intr_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/intr_machdep.c Tue May 10 13:59:33 2011 (r221737)
+++ head/sys/powerpc/powerpc/intr_machdep.c Tue May 10 14:03:05 2011 (r221738)
@@ -397,18 +397,22 @@ powerpc_enable_intr(void)
#ifdef SMP
/* Install an IPI handler. */
- for (n = 0; n < npics; n++) {
- if (piclist[n].dev != root_pic)
- continue;
-
- KASSERT(piclist[n].ipis != 0, ("%s", __func__));
- error = powerpc_setup_intr("IPI",
- MAP_IRQ(piclist[n].node, piclist[n].irqs),
- powerpc_ipi_handler, NULL, NULL,
- INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie);
- if (error) {
- printf("unable to setup IPI handler\n");
- return (error);
+ if (mp_ncpus > 1) {
+ for (n = 0; n < npics; n++) {
+ if (piclist[n].dev != root_pic)
+ continue;
+
+ KASSERT(piclist[n].ipis != 0,
+ ("%s: SMP root PIC does not supply any IPIs",
+ __func__));
+ error = powerpc_setup_intr("IPI",
+ MAP_IRQ(piclist[n].node, piclist[n].irqs),
+ powerpc_ipi_handler, NULL, NULL,
+ INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie);
+ if (error) {
+ printf("unable to setup IPI handler\n");
+ return (error);
+ }
}
}
#endif
More information about the svn-src-head
mailing list