Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f1d642f authored by Marc Zyngier's avatar Marc Zyngier Committed by Will Deacon
Browse files

drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property



Patch 19a469a5 ("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: default avatarMark Rutland <mark.rutland@arm.com>
Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Fixes: 19a469a5 ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask")
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent a026bb12
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -967,11 +967,12 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu)

	/* If we didn't manage to parse anything, try the interrupt affinity */
	if (cpumask_weight(&pmu->supported_cpus) == 0) {
		if (!using_spi) {
		int irq = platform_get_irq(pdev, 0);

		if (irq_is_percpu(irq)) {
			/* If using PPIs, check the affinity of the partition */
			int ret, irq;
			int ret;

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