Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf: arm_pmu: Convert to the 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 OF side of the ARM
PMU 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-9-maz@kernel.org

authored by

Marc Zyngier and committed by
Thomas Gleixner
663783e0 541454dd

+9 -7
+9 -7
drivers/perf/arm_pmu_platform.c
··· 42 42 return ret; 43 43 } 44 44 45 - static int pmu_parse_percpu_irq(struct arm_pmu *pmu, int irq) 45 + static int pmu_parse_percpu_irq(struct arm_pmu *pmu, int irq, 46 + const struct cpumask *affinity) 46 47 { 47 - int cpu, ret; 48 48 struct pmu_hw_events __percpu *hw_events = pmu->hw_events; 49 + int cpu; 49 50 50 - ret = irq_get_percpu_devid_partition(irq, &pmu->supported_cpus); 51 - if (ret) 52 - return ret; 51 + cpumask_copy(&pmu->supported_cpus, affinity); 53 52 54 53 for_each_cpu(cpu, &pmu->supported_cpus) 55 54 per_cpu(hw_events->irq, cpu) = irq; ··· 114 115 } 115 116 116 117 if (num_irqs == 1) { 117 - int irq = platform_get_irq(pdev, 0); 118 + const struct cpumask *affinity; 119 + int irq; 120 + 121 + irq = platform_get_irq_affinity(pdev, 0, &affinity); 118 122 if ((irq > 0) && irq_is_percpu_devid(irq)) 119 - return pmu_parse_percpu_irq(pmu, irq); 123 + return pmu_parse_percpu_irq(pmu, irq, affinity); 120 124 } 121 125 122 126 if (nr_cpu_ids != 1 && !pmu_has_irq_affinity(dev->of_node))