summaryrefslogtreecommitdiff
path: root/lib/utils/cache/objects.mk
diff options
context:
space:
mode:
authorAlexander Chuprunov <[email protected]>2025-09-18 12:07:04 +0300
committerAnup Patel <[email protected]>2025-10-27 16:56:16 +0530
commit1db95da2997b80f78c4b488a731801edc8c6379b (patch)
tree2d9ddfebe6c265eef2afda351a53bc98f32159a7 /lib/utils/cache/objects.mk
parent55296fd27c0ce12a2024c7eacfdbab2dfd39476b (diff)
lib: sbi: sbi_pmu: fixed hw counters start for hart
Generally, hardware performance counters can only be started, stopped, or configured from machine-mode using mcountinhibit and mhpmeventX CSRs. Also, in opensbi only sbi_pmu_ctr_cfg_match() managed mhpmeventX. But in generic Linux driver, when perf starts, Linux calls both sbi_pmu_ctr_cfg_match() and sbi_pmu_ctr_start(), while after hart suspend only sbi_pmu_ctr_start() command called through SBI interface. This doesn't work properly in case when suspend state resets HPM registers. In order to keep counter integrity, sbi_pmu_ctr_start() modified. First, we're saving hw_counters_data, and after hart suspend this value is restored if event is currently active. Signed-off-by: Alexander Chuprunov <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/cache/objects.mk')
0 files changed, 0 insertions, 0 deletions