summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2009-10-13 19:44:56 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-10-30 17:21:30 +1100
commit76f1d94f3ebdee0d14cab4d87bdeed1cf9badb17 (patch)
treedda39a7df556dddff29014a32107804252bc2330 /arch/powerpc/kernel/irq.c
parent32c105c3781d32c55429fbac493602028913390a (diff)
powerpc: Make virq_debug_show() cope with sparse irq_descs
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 65632215f02..baa49eb9322 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1065,8 +1065,11 @@ static int virq_debug_show(struct seq_file *m, void *private)
seq_printf(m, "%-5s %-7s %-15s %s\n", "virq", "hwirq",
"chip name", "host name");
- for (i = 1; i < NR_IRQS; i++) {
+ for (i = 1; i < nr_irqs; i++) {
desc = irq_to_desc(i);
+ if (!desc)
+ continue;
+
spin_lock_irqsave(&desc->lock, flags);
if (desc->action && desc->action->handler) {