Skip to content

Commit f6c8ace

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
perf: arm_spe_pmu: Convert to new interrupt affinity retrieval API
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
1 parent 663783e commit f6c8ace

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/perf/arm_spe_pmu.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,8 +1287,10 @@ static void arm_spe_pmu_dev_teardown(struct arm_spe_pmu *spe_pmu)
12871287
static int arm_spe_pmu_irq_probe(struct arm_spe_pmu *spe_pmu)
12881288
{
12891289
struct platform_device *pdev = spe_pmu->pdev;
1290-
int irq = platform_get_irq(pdev, 0);
1290+
const struct cpumask *affinity;
1291+
int irq;
12911292

1293+
irq = platform_get_irq_affinity(pdev, 0, &affinity);
12921294
if (irq < 0)
12931295
return -ENXIO;
12941296

@@ -1297,10 +1299,7 @@ static int arm_spe_pmu_irq_probe(struct arm_spe_pmu *spe_pmu)
12971299
return -EINVAL;
12981300
}
12991301

1300-
if (irq_get_percpu_devid_partition(irq, &spe_pmu->supported_cpus)) {
1301-
dev_err(&pdev->dev, "failed to get PPI partition (%d)\n", irq);
1302-
return -EINVAL;
1303-
}
1302+
cpumask_copy(&spe_pmu->supported_cpus, affinity);
13041303

13051304
spe_pmu->irq = irq;
13061305
return 0;

0 commit comments

Comments
 (0)