summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/include/intr_machdep.h2
-rw-r--r--sys/powerpc/powerpc/intr_machdep.c6
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);
OpenPOWER on IntegriCloud