public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v3-its: Correctly fish out the DID for platform MSI
@ 2024-07-18  7:58 Marc Zyngier
  2024-07-18 18:38 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Zyngier @ 2024-07-18  7:58 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: Thomas Gleixner

Similarly to what we do for PCI where msi-map/msi-mask are used
to compute the full RID (aka DID in ITS speak), we use msi-parent
as the discovery mechanism, since there is no way a device can
generally express its ID.

However, since we switched to a per-device MSI domain model,
the domain passed to its_pmsi_prepare() is the wrong one, and
points to the device's instead of the ITS'. Bad.

Use the parent domain instead, which is the ITS domain.

Fixes: 80b63cc1cc146 ("irqchip/gic-v3-its: Switch platform MSI to MSI parent")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/irq-gic-v3-its-msi-parent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its-msi-parent.c b/drivers/irqchip/irq-gic-v3-its-msi-parent.c
index 2f3fc597331ba..e150365fbe892 100644
--- a/drivers/irqchip/irq-gic-v3-its-msi-parent.c
+++ b/drivers/irqchip/irq-gic-v3-its-msi-parent.c
@@ -134,7 +134,7 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
 	int ret;
 
 	if (dev->of_node)
-		ret = of_pmsi_get_dev_id(domain, dev, &dev_id);
+		ret = of_pmsi_get_dev_id(domain->parent, dev, &dev_id);
 	else
 		ret = iort_pmsi_get_dev_id(dev, &dev_id);
 	if (ret)
-- 
2.39.2


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

* [tip: irq/msi] irqchip/gic-v3-its: Correctly fish out the DID for platform MSI
  2024-07-18  7:58 [PATCH] irqchip/gic-v3-its: Correctly fish out the DID for platform MSI Marc Zyngier
@ 2024-07-18 18:38 ` tip-bot2 for Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Marc Zyngier @ 2024-07-18 18:38 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Marc Zyngier, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the irq/msi branch of tip:

Commit-ID:     c9b4f313f6b83ac80e9d51845d092c32513efdb4
Gitweb:        https://git.kernel.org/tip/c9b4f313f6b83ac80e9d51845d092c32513efdb4
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Thu, 18 Jul 2024 08:58:04 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 18 Jul 2024 20:34:46 +02:00

irqchip/gic-v3-its: Correctly fish out the DID for platform MSI

Similarly to PCI where msi-map/msi-mask are used to compute the full RID
(aka DID in ITS speak), use the msi-parent as the discovery mechanism,
since there is no way a device can generally express its ID.

However, since switching to a per-device MSI domain model, the domain
passed to its_pmsi_prepare() is the wrong one, and points to the device's
instead of the ITS'. Bad.

Use the parent domain instead, which is the ITS domain.

Fixes: 80b63cc1cc146 ("irqchip/gic-v3-its: Switch platform MSI to MSI parent")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240718075804.2245733-1-maz@kernel.org

---
 drivers/irqchip/irq-gic-v3-its-msi-parent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its-msi-parent.c b/drivers/irqchip/irq-gic-v3-its-msi-parent.c
index 2f3fc59..e150365 100644
--- a/drivers/irqchip/irq-gic-v3-its-msi-parent.c
+++ b/drivers/irqchip/irq-gic-v3-its-msi-parent.c
@@ -134,7 +134,7 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
 	int ret;
 
 	if (dev->of_node)
-		ret = of_pmsi_get_dev_id(domain, dev, &dev_id);
+		ret = of_pmsi_get_dev_id(domain->parent, dev, &dev_id);
 	else
 		ret = iort_pmsi_get_dev_id(dev, &dev_id);
 	if (ret)

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

end of thread, other threads:[~2024-07-18 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-18  7:58 [PATCH] irqchip/gic-v3-its: Correctly fish out the DID for platform MSI Marc Zyngier
2024-07-18 18:38 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox