Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf/arm-cmn: Move IRQs when migrating context

If we migrate the PMU context to another CPU, we need to remember to
retarget the IRQs as well.

Fixes: 0ba64770a2f2 ("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>

authored by

Robin Murphy and committed by
Will Deacon
1c8147ea 79d7c3dc

+3 -1
+3 -1
drivers/perf/arm-cmn.c
··· 1150 1150 static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node) 1151 1151 { 1152 1152 struct arm_cmn *cmn; 1153 - unsigned int target; 1153 + unsigned int i, target; 1154 1154 1155 1155 cmn = hlist_entry_safe(node, struct arm_cmn, cpuhp_node); 1156 1156 if (cpu != cmn->cpu) ··· 1161 1161 return 0; 1162 1162 1163 1163 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)); 1164 1166 cmn->cpu = target; 1165 1167 return 0; 1166 1168 }