Skip to contentSkip to conversation

perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used

PATCH Applied Ilkka Koskinen 2 participants 2 messages Jun 8, 2023 – Jun 9, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used

Don't try to set irq affinity if PMU doesn't have an overflow interrupt.

Fixes e37dfd65731d ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
---
 drivers/perf/arm_cspmu/arm_cspmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/perf/arm_cspmu/arm_cspmu.c +2 -1
index 9021d1878250..62be0956dbba 100644
@@ -1250,7 +1250,8 @@ static struct platform_driver arm_cspmu_driver = {
 static void arm_cspmu_set_active_cpu(int cpu, struct arm_cspmu *cspmu)
 {
 	cpumask_set_cpu(cpu, &cspmu->active_cpu);
-	WARN_ON(irq_set_affinity(cspmu->irq, &cspmu->active_cpu));
+	if (cspmu->irq)
+		WARN_ON(irq_set_affinity(cspmu->irq, &cspmu->active_cpu));
 }
 
 static int arm_cspmu_cpu_online(unsigned int cpu, struct hlist_node *node)
Signature · 1 line
2.40.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Ilkka Koskinen

Don't try to set irq affinity if PMU doesn't have an overflow interrupt.

Applied to will (for-next/perf), thanks!

[1/1] perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used

      https://git.kernel.org/will/c/225d757012e0

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev