Skip to content

Commit 1513782

Browse files
committed
irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count
Currently the irqdomain select callback is only invoked when the parameter count of the fwspec arguments is not zero. That makes sense because then the match is on the firmware node and eventually on the bus_token, which is already handled in the core code. The upcoming support for per device MSI domains requires to do real bus token specific checks in the MSI parent domains with a zero parameter count. Make the gic-v3 select() callback handle that case. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Anup Patel <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 841c351 commit 1513782

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/irqchip/irq-gic-v3.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,9 +1702,13 @@ static int gic_irq_domain_select(struct irq_domain *d,
17021702
irq_hw_number_t hwirq;
17031703

17041704
/* Not for us */
1705-
if (fwspec->fwnode != d->fwnode)
1705+
if (fwspec->fwnode != d->fwnode)
17061706
return 0;
17071707

1708+
/* Handle pure domain searches */
1709+
if (!fwspec->param_count)
1710+
return d->bus_token == bus_token;
1711+
17081712
/* If this is not DT, then we have a single domain */
17091713
if (!is_of_node(fwspec->fwnode))
17101714
return 1;

0 commit comments

Comments
 (0)