svn commit: r293058 - in head/sys/powerpc: include powerpc
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sat Jan 2 19:34:38 UTC 2016
Author: nwhitehorn
Date: Sat Jan 2 19:34:37 2016
New Revision: 293058
URL: https://svnweb.freebsd.org/changeset/base/293058
Log:
Bump the maximum number of interrupt controllers to allow for the
proliferation of them on large IBM systems and add some error checking if
we exceed that number.
MFC after: 1 week
Modified:
head/sys/powerpc/include/intr_machdep.h
head/sys/powerpc/powerpc/intr_machdep.c
Modified: head/sys/powerpc/include/intr_machdep.h
==============================================================================
--- head/sys/powerpc/include/intr_machdep.h Sat Jan 2 19:28:35 2016 (r293057)
+++ head/sys/powerpc/include/intr_machdep.h Sat Jan 2 19:34:37 2016 (r293058)
@@ -30,7 +30,7 @@
#define INTR_VECTORS 256
-#define MAX_PICS 5
+#define MAX_PICS 16
#define MAP_IRQ(node, pin) powerpc_get_irq(node, pin)
/*
Modified: head/sys/powerpc/powerpc/intr_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/intr_machdep.c Sat Jan 2 19:28:35 2016 (r293057)
+++ head/sys/powerpc/powerpc/intr_machdep.c Sat Jan 2 19:34:37 2016 (r293058)
@@ -352,6 +352,9 @@ powerpc_register_pic(device_t dev, uint3
npics++;
}
+ KASSERT(npics < MAX_PICS,
+ ("Number of PICs exceeds maximum (%d)", MAX_PICS));
+
mtx_unlock(&intr_table_lock);
}
@@ -385,6 +388,9 @@ powerpc_get_irq(uint32_t node, u_int pin
nirqs += 128;
npics++;
+ KASSERT(npics < MAX_PICS,
+ ("Number of PICs exceeds maximum (%d)", MAX_PICS));
+
mtx_unlock(&intr_table_lock);
return (piclist[idx].base + pin);
More information about the svn-src-all
mailing list