Skip to content
Commit e9a023f2 authored by Eric Lin's avatar Eric Lin Committed by Will Deacon
Browse files

drivers/perf: riscv_pmu: Add riscv pmu pm notifier



Currently, when the CPU is doing suspend to ram, we don't
save pmu counter register and its content will be lost.

To ensure perf profiling is not affected by suspend to ram,
this patch is based on arm_pmu CPU_PM notifier and implements riscv
pmu pm notifier. In the pm notifier, we stop the counter and update
the counter value before suspend and start the counter after resume.

Signed-off-by: default avatarEric Lin <eric.lin@sifive.com>
Link: https://lore.kernel.org/r/20220705091920.27432-1-eric.lin@sifive.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent e500405d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment