]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf/smmuv3: Use msi_get_virq()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 10 Dec 2021 22:19:29 +0000 (23:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:16:41 +0000 (22:16 +0100)
Let the core code fiddle with the MSI descriptor retrieval.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211210221815.029143589@linutronix.de
drivers/perf/arm_smmuv3_pmu.c

index 226348822ab399eced434290e5bafdf5c9a59491..fdbc3ec20f4b7bfbc0128f58b76d5ae0e85abaf8 100644 (file)
@@ -684,7 +684,6 @@ static void smmu_pmu_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
 
 static void smmu_pmu_setup_msi(struct smmu_pmu *pmu)
 {
-       struct msi_desc *desc;
        struct device *dev = pmu->dev;
        int ret;
 
@@ -701,9 +700,7 @@ static void smmu_pmu_setup_msi(struct smmu_pmu *pmu)
                return;
        }
 
-       desc = first_msi_entry(dev);
-       if (desc)
-               pmu->irq = desc->irq;
+       pmu->irq = msi_get_virq(dev, 0);
 
        /* Add callback to free MSIs on teardown */
        devm_add_action(dev, smmu_pmu_free_msis, dev);