| From 5e11ca5fc414ac5f305042ae167d90d165776a37 Mon Sep 17 00:00:00 2001 |
| From: Marc Zyngier <marc.zyngier@arm.com> |
| Date: Fri, 16 Mar 2018 14:35:17 +0000 |
| Subject: [PATCH 0792/1795] irqchip/gic: Loudly complain about the use of |
| IRQ_TYPE_NONE |
| |
| There is a huge number of broken device trees out there. Just |
| grepping through the tree for the use of IRQ_TYPE_NONE in conjunction |
| with the GIC is scary. |
| |
| People just don't realise that IRQ_TYPE_NONE just doesn't exist, and |
| you just get whatever junk was there before. So let's make them aware |
| of the issue. |
| |
| Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> |
| (cherry picked from commit 83a86fbb5b56b5eed8a476cc3fe214077d7c4f49) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| --- |
| drivers/irqchip/irq-gic.c | 5 +++++ |
| 1 file changed, 5 insertions(+) |
| |
| diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c |
| index 79801c24800b..ac2e62d613d1 100644 |
| --- a/drivers/irqchip/irq-gic.c |
| +++ b/drivers/irqchip/irq-gic.c |
| @@ -1011,6 +1011,9 @@ static int gic_irq_domain_translate(struct irq_domain *d, |
| *hwirq += 16; |
| |
| *type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK; |
| + |
| + /* Make it clear that broken DTs are... broken */ |
| + WARN_ON(*type == IRQ_TYPE_NONE); |
| return 0; |
| } |
| |
| @@ -1020,6 +1023,8 @@ static int gic_irq_domain_translate(struct irq_domain *d, |
| |
| *hwirq = fwspec->param[0]; |
| *type = fwspec->param[1]; |
| + |
| + WARN_ON(*type == IRQ_TYPE_NONE); |
| return 0; |
| } |
| |
| -- |
| 2.19.0 |
| |