]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
irqchip/gic-v3-its: Add fsl_mc device plumbing to the msi-parent handling
authorMarc Zyngier <maz@kernel.org>
Tue, 24 Feb 2026 10:09:33 +0000 (10:09 +0000)
committerChristophe Leroy (CS GROUP) <chleroy@kernel.org>
Thu, 26 Feb 2026 09:48:18 +0000 (10:48 +0100)
Make the ITS code aware of fsl_mc devices by plumbing the devid
retrieval primitive.

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> # LX2160ARDB, LS2088ARDB
Tested-by: Sascha Bischoff <sascha.bischoff@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Thomas Gleixner <tglx@kernel.org>
Link: https://lore.kernel.org/r/20260224100936.3752303-4-maz@kernel.org
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
drivers/irqchip/irq-gic-its-msi-parent.c

index a832cdb2e697840e97f683a92001e5d7ed3f789b..d36b278ae66c522f7873a15767b30b11b75ab822 100644 (file)
@@ -5,6 +5,7 @@
 // Copyright (C) 2022 Intel
 
 #include <linux/acpi_iort.h>
+#include <linux/fsl/mc.h>
 #include <linux/of_address.h>
 #include <linux/pci.h>
 
@@ -187,9 +188,11 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,
 {
        struct msi_domain_info *msi_info;
        u32 dev_id;
-       int ret;
+       int ret = 0;
 
-       if (dev->of_node)
+       if (dev_is_fsl_mc(dev))
+               dev_id = fsl_mc_get_msi_id(dev);
+       else if (dev->of_node)
                ret = of_pmsi_get_msi_info(domain->parent, dev, &dev_id, NULL);
        else
                ret = iort_pmsi_get_msi_info(dev, &dev_id, NULL);