Skip to content

Commit

Permalink
perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used
Browse files Browse the repository at this point in the history
Don't try to set irq affinity if PMU doesn't have an overflow interrupt.

Fixes: e37dfd6 ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20230608203742.3503486-1-ilkka@os.amperecomputing.com
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Ilkka Koskinen authored and Will Deacon committed Jun 9, 2023
1 parent 7a6a9f1 commit 225d757
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/perf/arm_cspmu/arm_cspmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,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)
Expand Down

0 comments on commit 225d757

Please sign in to comment.