Skip to content

Commit 7f1d642

Browse files
Marc Zyngierwildea01
authored andcommitted
drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
Patch 19a469a ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask") added support for partitionned PPI setups, but inadvertently broke setups using SPIs without the "interrupt-affinity" property (which is the case for UP platforms). This patch restore the broken functionnality by testing whether the interrupt is percpu or not instead of relying on the using_spi flag that really means "SPI *and* interrupt-affinity property". Acked-by: Mark Rutland <mark.rutland@arm.com> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: 19a469a ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask") Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent a026bb1 commit 7f1d642

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/perf/arm_pmu.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,11 +967,12 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu)
967967

968968
/* If we didn't manage to parse anything, try the interrupt affinity */
969969
if (cpumask_weight(&pmu->supported_cpus) == 0) {
970-
if (!using_spi) {
970+
int irq = platform_get_irq(pdev, 0);
971+
972+
if (irq_is_percpu(irq)) {
971973
/* If using PPIs, check the affinity of the partition */
972-
int ret, irq;
974+
int ret;
973975

974-
irq = platform_get_irq(pdev, 0);
975976
ret = irq_get_percpu_devid_partition(irq, &pmu->supported_cpus);
976977
if (ret) {
977978
kfree(irqs);

0 commit comments

Comments
 (0)