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
This commit is contained in:
Nathan Whitehorn 2016-01-02 19:34:37 +00:00
parent 9f4a7eae43
commit 2f204e1fe4
2 changed files with 7 additions and 1 deletions

View File

@ -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)
/*

View File

@ -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);