linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v3: handle DOMAIN_BUS_ANY in gic_irq_domain_select
@ 2024-02-19 14:47 Dmitry Baryshkov
  2024-02-19 15:53 ` Marc Zyngier
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2024-02-19 14:47 UTC (permalink / raw)
  To: Marc Zyngier, Thomas Gleixner, Anup Patel
  Cc: Konrad Dybcio, linux-arm-kernel, linux-kernel, linux-arm-msm,
	Dmitry Baryshkov

Before the commit de1ff306dcf4 ("genirq/irqdomain: Remove the param
count restriction from select()") the irq_find_matching_fwspec() was
handling the DOMAIN_BUS_ANY on its own. After this commit it is a job of
the select() callback. However the callback of GICv3 (even though it got
modified to handle zero param_count) wasn't prepared to return true for
DOMAIN_BUS_ANY bus_token.

This breaks probing of any of the child IRQ domains, since
platform_irqchip_probe() uses irq_find_matching_host(par_np,
DOMAIN_BUS_ANY) to check for the presence of the parent IRQ domain.

Fixes: 151378251004 ("irqchip/gic-v3: Make gic_irq_domain_select() robust for zero parameter count")
Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/irqchip/irq-gic-v3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 6fb276504bcc..e9e9643c653f 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1696,7 +1696,8 @@ static int gic_irq_domain_select(struct irq_domain *d,
 
 	/* Handle pure domain searches */
 	if (!fwspec->param_count)
-		return d->bus_token == bus_token;
+		return d->bus_token == bus_token ||
+			bus_token == DOMAIN_BUS_ANY;
 
 	/* If this is not DT, then we have a single domain */
 	if (!is_of_node(fwspec->fwnode))

---
base-commit: 35a4fdde2466b9d90af297f249436a270ef9d30e
change-id: 20240219-gic-fix-child-domain-8a1840be9ff5

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-19 19:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19 14:47 [PATCH] irqchip/gic-v3: handle DOMAIN_BUS_ANY in gic_irq_domain_select Dmitry Baryshkov
2024-02-19 15:53 ` Marc Zyngier
2024-02-19 16:21   ` Dmitry Baryshkov
2024-02-19 16:37     ` Marc Zyngier
2024-02-19 17:41       ` Dmitry Baryshkov
2024-02-19 17:51         ` Marc Zyngier
2024-02-19 19:28           ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).