]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf: arm_spe_pmu: Convert to new interrupt affinity retrieval API
authorMarc Zyngier <maz@kernel.org>
Mon, 20 Oct 2025 12:29:26 +0000 (13:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 27 Oct 2025 16:16:33 +0000 (17:16 +0100)
Now that the relevant interrupt controllers are equipped with a callback
returning the affinity of per-CPU interrupts, switch the ARM SPE driver
over to this new method.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20251020122944.3074811-10-maz@kernel.org
drivers/perf/arm_spe_pmu.c

index fa50645feddadbea5dc1e404f80f62cf5aa96fd4..1460b02d20e8b677eb9a26a22248ea1310f43d4d 100644 (file)
@@ -1287,8 +1287,10 @@ static void arm_spe_pmu_dev_teardown(struct arm_spe_pmu *spe_pmu)
 static int arm_spe_pmu_irq_probe(struct arm_spe_pmu *spe_pmu)
 {
        struct platform_device *pdev = spe_pmu->pdev;
-       int irq = platform_get_irq(pdev, 0);
+       const struct cpumask *affinity;
+       int irq;
 
+       irq = platform_get_irq_affinity(pdev, 0, &affinity);
        if (irq < 0)
                return -ENXIO;
 
@@ -1297,10 +1299,7 @@ static int arm_spe_pmu_irq_probe(struct arm_spe_pmu *spe_pmu)
                return -EINVAL;
        }
 
-       if (irq_get_percpu_devid_partition(irq, &spe_pmu->supported_cpus)) {
-               dev_err(&pdev->dev, "failed to get PPI partition (%d)\n", irq);
-               return -EINVAL;
-       }
+       cpumask_copy(&spe_pmu->supported_cpus, affinity);
 
        spe_pmu->irq = irq;
        return 0;