Skip to content

Commit 83a86fb

Browse files
author
Marc Zyngier
committed
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>
1 parent 920181c commit 83a86fb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/irqchip/irq-gic.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,9 @@ static int gic_irq_domain_translate(struct irq_domain *d,
10111011
*hwirq += 16;
10121012

10131013
*type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
1014+
1015+
/* Make it clear that broken DTs are... broken */
1016+
WARN_ON(*type == IRQ_TYPE_NONE);
10141017
return 0;
10151018
}
10161019

@@ -1020,6 +1023,8 @@ static int gic_irq_domain_translate(struct irq_domain *d,
10201023

10211024
*hwirq = fwspec->param[0];
10221025
*type = fwspec->param[1];
1026+
1027+
WARN_ON(*type == IRQ_TYPE_NONE);
10231028
return 0;
10241029
}
10251030

0 commit comments

Comments
 (0)