Skip to content

Commit 86399c1

Browse files
rmurphy-armgregkh
authored andcommitted
perf/arm-cmn: Move IRQs when migrating context
[ Upstream commit 1c8147e ] If we migrate the PMU context to another CPU, we need to remember to retarget the IRQs as well. Fixes: 0ba6477 ("perf: Add Arm CMN-600 PMU driver") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/e080640aea4ed8dfa870b8549dfb31221803eb6b.1611839564.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1ea83d4 commit 86399c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/perf/arm-cmn.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ static int arm_cmn_commit_txn(struct pmu *pmu)
11501150
static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
11511151
{
11521152
struct arm_cmn *cmn;
1153-
unsigned int target;
1153+
unsigned int i, target;
11541154

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

11631163
perf_pmu_migrate_context(&cmn->pmu, cpu, target);
1164+
for (i = 0; i < cmn->num_dtcs; i++)
1165+
irq_set_affinity_hint(cmn->dtc[i].irq, cpumask_of(target));
11641166
cmn->cpu = target;
11651167
return 0;
11661168
}

0 commit comments

Comments
 (0)