Commit 57fe1b26 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/irq: enforce correct irqclass_sub_desc array size

Add a BUILD_BUG_ON() to enforce that irqclass_sub_desc contains the required
number of defined interrupt descriptions and won't be filled up with zeros.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 304987e3
...@@ -56,7 +56,7 @@ static const struct irq_class irqclass_main_desc[NR_IRQS_BASE] = { ...@@ -56,7 +56,7 @@ static const struct irq_class irqclass_main_desc[NR_IRQS_BASE] = {
* /proc/interrupts. * /proc/interrupts.
* In addition this list contains non external / I/O events like NMIs. * In addition this list contains non external / I/O events like NMIs.
*/ */
static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = { static const struct irq_class irqclass_sub_desc[] = {
{.irq = IRQEXT_CLK, .name = "CLK", .desc = "[EXT] Clock Comparator"}, {.irq = IRQEXT_CLK, .name = "CLK", .desc = "[EXT] Clock Comparator"},
{.irq = IRQEXT_EXC, .name = "EXC", .desc = "[EXT] External Call"}, {.irq = IRQEXT_EXC, .name = "EXC", .desc = "[EXT] External Call"},
{.irq = IRQEXT_EMS, .name = "EMS", .desc = "[EXT] Emergency Signal"}, {.irq = IRQEXT_EMS, .name = "EMS", .desc = "[EXT] Emergency Signal"},
...@@ -94,6 +94,7 @@ static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = { ...@@ -94,6 +94,7 @@ static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = {
void __init init_IRQ(void) void __init init_IRQ(void)
{ {
BUILD_BUG_ON(ARRAY_SIZE(irqclass_sub_desc) != NR_ARCH_IRQS);
init_cio_interrupts(); init_cio_interrupts();
init_airq_interrupts(); init_airq_interrupts();
init_ext_interrupts(); init_ext_interrupts();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment