[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175199882197.406.260316084878228381.tip-bot2@tip-bot2>
Date: Tue, 08 Jul 2025 18:20:21 -0000
From: "irqchip-bot for Lorenzo Pieralisi" <tip-bot2@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>, Marc Zyngier <maz@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: [irqchip: irq/irqchip-next] irqchip/msi-lib: Add
IRQ_DOMAIN_FLAG_FWNODE_PARENT handling
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 8b65db1e93a227ad9cc1b67cb221b06869f0b35f
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/8b65db1e93a227ad9cc1b67cb221b06869f0b35f
Author: Lorenzo Pieralisi <lpieralisi@...nel.org>
AuthorDate: Thu, 03 Jul 2025 12:25:17 +02:00
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Tue, 08 Jul 2025 18:35:52 +01:00
irqchip/msi-lib: Add IRQ_DOMAIN_FLAG_FWNODE_PARENT handling
In some irqchip implementations the fwnode representing the IRQdomain
and the MSI controller fwnode do not match; in particular the IRQdomain
fwnode is the MSI controller fwnode parent.
To support selecting such IRQ domains, add a flag in core IRQ domain
code that explicitly tells the MSI lib to use the parent fwnode while
carrying out IRQ domain selection.
Update the msi-lib select callback with the resulting logic.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@...nel.org>
Reviewed-by: Marc Zyngier <maz@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20250703-gicv5-host-v7-27-12e71f1b3528@kernel.org
Signed-off-by: Marc Zyngier <maz@...nel.org>
---
drivers/irqchip/irq-msi-lib.c | 5 ++++-
include/linux/irqdomain.h | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-msi-lib.c b/drivers/irqchip/irq-msi-lib.c
index 246c302..454c7f1 100644
--- a/drivers/irqchip/irq-msi-lib.c
+++ b/drivers/irqchip/irq-msi-lib.c
@@ -133,11 +133,14 @@ int msi_lib_irq_domain_select(struct irq_domain *d, struct irq_fwspec *fwspec,
{
const struct msi_parent_ops *ops = d->msi_parent_ops;
u32 busmask = BIT(bus_token);
+ struct fwnode_handle *fwh;
if (!ops)
return 0;
- if (fwspec->fwnode != d->fwnode || fwspec->param_count != 0)
+ fwh = d->flags & IRQ_DOMAIN_FLAG_FWNODE_PARENT ? fwnode_get_parent(fwspec->fwnode)
+ : fwspec->fwnode;
+ if (fwh != d->fwnode || fwspec->param_count != 0)
return 0;
/* Handle pure domain searches */
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 7387d18..25c7cbe 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -212,6 +212,9 @@ enum {
/* Address and data pair is mutable when irq_set_affinity() */
IRQ_DOMAIN_FLAG_MSI_IMMUTABLE = (1 << 11),
+ /* IRQ domain requires parent fwnode matching */
+ IRQ_DOMAIN_FLAG_FWNODE_PARENT = (1 << 12),
+
/*
* Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved
* for implementation specific purposes and ignored by the
Powered by blists - more mailing lists