diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2016-01-02 19:34:37 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2016-01-02 19:34:37 +0000 |
commit | 67b3e73120621301aec086ea4652c7c2c0dae94b (patch) | |
tree | 8cbaed3857919746d9482346c3c4f4152d325318 /sys | |
parent | b6345059e4f17857275423b89f3b2995e550f27d (diff) | |
download | FreeBSD-src-67b3e73120621301aec086ea4652c7c2c0dae94b.zip FreeBSD-src-67b3e73120621301aec086ea4652c7c2c0dae94b.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/include/intr_machdep.h | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/intr_machdep.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/powerpc/include/intr_machdep.h b/sys/powerpc/include/intr_machdep.h index c2529d5..32a94be 100644 --- a/sys/powerpc/include/intr_machdep.h +++ b/sys/powerpc/include/intr_machdep.h @@ -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) /* diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index b481279..a17d9ff 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -352,6 +352,9 @@ powerpc_register_pic(device_t dev, uint32_t node, u_int irqs, u_int ipis, 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); |