diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-03-25 03:05:49 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-03-25 06:49:52 -0400 |
commit | 57fe1b263907430a27fabcfde11a144caac9f5cd (patch) | |
tree | c96bf9d0a311dcb58a207aa0387ae37a3eee28e7 /arch/s390 | |
parent | 304987e36577e308be483113fa85cef8d1b948d8 (diff) |
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: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/irq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index f238720690f3..02ab9aa3812e 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -56,7 +56,7 @@ static const struct irq_class irqclass_main_desc[NR_IRQS_BASE] = { | |||
56 | * /proc/interrupts. | 56 | * /proc/interrupts. |
57 | * In addition this list contains non external / I/O events like NMIs. | 57 | * In addition this list contains non external / I/O events like NMIs. |
58 | */ | 58 | */ |
59 | static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = { | 59 | static const struct irq_class irqclass_sub_desc[] = { |
60 | {.irq = IRQEXT_CLK, .name = "CLK", .desc = "[EXT] Clock Comparator"}, | 60 | {.irq = IRQEXT_CLK, .name = "CLK", .desc = "[EXT] Clock Comparator"}, |
61 | {.irq = IRQEXT_EXC, .name = "EXC", .desc = "[EXT] External Call"}, | 61 | {.irq = IRQEXT_EXC, .name = "EXC", .desc = "[EXT] External Call"}, |
62 | {.irq = IRQEXT_EMS, .name = "EMS", .desc = "[EXT] Emergency Signal"}, | 62 | {.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 | 94 | ||
95 | void __init init_IRQ(void) | 95 | void __init init_IRQ(void) |
96 | { | 96 | { |
97 | BUILD_BUG_ON(ARRAY_SIZE(irqclass_sub_desc) != NR_ARCH_IRQS); | ||
97 | init_cio_interrupts(); | 98 | init_cio_interrupts(); |
98 | init_airq_interrupts(); | 99 | init_airq_interrupts(); |
99 | init_ext_interrupts(); | 100 | init_ext_interrupts(); |