Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
BACKPORT: perf/arm-cmn: Move IRQs when migrating context
Browse files Browse the repository at this point in the history
If we migrate the PMU context to another CPU, we need to remember to
retarget the IRQs as well.

This patch is needed to fix issue when mitigrate context to another CPU.

This patch is backported from:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/perf/arm-cmn.c?id=1c8147ea89c883d1f4e20f1b1d9c879291430102

Fixes: 0ba6477 ("perf: Add Arm CMN-600 PMU driver")
Signed-off-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/e080640aea4ed8dfa870b8549dfb31221803eb6b.1611839564.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Tuan Phan <[email protected]>
  • Loading branch information
rmurphy-arm authored and adamliyi committed May 21, 2021
1 parent 87957b2 commit 2aef8e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/perf/arm-cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ static int arm_cmn_commit_txn(struct pmu *pmu)
static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
{
struct arm_cmn *cmn;
unsigned int target;
unsigned int i, target;

cmn = hlist_entry_safe(node, struct arm_cmn, cpuhp_node);
if (cpu != cmn->cpu)
Expand All @@ -1161,6 +1161,8 @@ static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
return 0;

perf_pmu_migrate_context(&cmn->pmu, cpu, target);
for (i = 0; i < cmn->num_dtcs; i++)
irq_set_affinity_hint(cmn->dtc[i].irq, cpumask_of(target));
cmn->cpu = target;
return 0;
}
Expand Down

0 comments on commit 2aef8e0

Please sign in to comment.