mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
irqchip/gic-v3: 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>
This commit is contained in:
parent
83a86fbb5b
commit
6ef6386ef7
1 changed files with 5 additions and 0 deletions
|
@ -916,6 +916,9 @@ static int gic_irq_domain_translate(struct irq_domain *d,
|
|||
}
|
||||
|
||||
*type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
|
||||
|
||||
/* Make it clear that broken DTs are... broken */
|
||||
WARN_ON(*type == IRQ_TYPE_NONE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -925,6 +928,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue