Commit c9b4f313 authored by Marc Zyngier's avatar Marc Zyngier Committed by Thomas Gleixner

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: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240718075804.2245733-1-maz@kernel.org
parent 99d7fbf8
...@@ -134,7 +134,7 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev, ...@@ -134,7 +134,7 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
int ret; int ret;
if (dev->of_node) 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 else
ret = iort_pmsi_get_dev_id(dev, &dev_id); ret = iort_pmsi_get_dev_id(dev, &dev_id);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment