summaryrefslogtreecommitdiffstats
path: root/kernel/irq/generic-chip.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2013-05-29 03:10:52 +0100
committerThomas Gleixner <tglx@linutronix.de>2013-05-29 10:57:11 +0200
commite8bd834f73714378ef110a64287db1b77033c8da (patch)
tree344493bc19c638aca611e3b5c7e44e234288685a /kernel/irq/generic-chip.c
parent088f40b7b027dad6519712ff224a5798dd62a204 (diff)
downloadlinux-e8bd834f73714378ef110a64287db1b77033c8da.tar.bz2
genirq: irqchip: Add mask to block out invalid irqs
Some controllers have irqs that aren't wired up and must never be used. For the generic chip attached to an irq_domain this provides a mask that can be used to block out particular irqs so that they never get mapped. Signed-off-by: Grant Likely <grant.likely@linaro.org> Link: http://lkml.kernel.org/r/1369793454-19197-2-git-send-email-grant.likely@linaro.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/generic-chip.c')
-rw-r--r--kernel/irq/generic-chip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 8743d62fded7..95575d8d5392 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -359,6 +359,9 @@ static int irq_map_generic_chip(struct irq_domain *d, unsigned int virq,
idx = hw_irq % dgc->irqs_per_chip;
+ if (test_bit(idx, &gc->unused))
+ return -ENOTSUPP;
+
if (test_bit(idx, &gc->installed))
return -EBUSY;