Skip to content

Commit ad8c912

Browse files
sandip4nIngo Molnar
authored andcommitted
perf/x86/amd/core: Avoid register reset when CPU is dead
When bringing a CPU online, some of the PMC and LBR related registers are reset. The same is done when a CPU is taken offline although that is unnecessary. This currently happens in the "cpu_dead" callback which is also incorrect as the callback runs on a control CPU instead of the one that is being taken offline. This also affects hibernation and suspend to RAM on some platforms as reported in the link below. Fixes: 21d59e3 ("perf/x86/amd/core: Detect PerfMonV2 support") Reported-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Sandipan Das <sandipan.das@amd.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/550a026764342cf7e5812680e3e2b91fe662b5ac.1706526029.git.sandipan.das@amd.com
1 parent 29297ff commit ad8c912

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/x86/events/amd/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ static void amd_pmu_cpu_dead(int cpu)
604604

605605
kfree(cpuhw->lbr_sel);
606606
cpuhw->lbr_sel = NULL;
607-
amd_pmu_cpu_reset(cpu);
608607

609608
if (!x86_pmu.amd_nb_constraints)
610609
return;

0 commit comments

Comments
 (0)