Skip to content

Commit

Permalink
irqchip/gic: Loudly complain about the use of IRQ_TYPE_NONE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marc Zyngier committed Mar 16, 2018
1 parent 920181c commit 83a86fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/irqchip/irq-gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 83a86fb

Please sign in to comment.