lib: sbi: Do not clear active_events for cycle/instret when stopping
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Thu, 13 Apr 2023 14:02:18 +0000 (16:02 +0200)
committerAnup Patel <anup@brainfault.org>
Mon, 17 Apr 2023 03:56:26 +0000 (09:26 +0530)
commitbdb3c42bca1c7fddd0c43f0be24c3a1590f02e50
tree94fff47490edefc513a46e70d50c51b8bdba9eb5
parente41dbb507c422c52cf93228ca7157394d49ca9fe
lib: sbi: Do not clear active_events for cycle/instret when stopping

Those events are enabled by default and should not be reset afterwards
since when using SBI_PMU_CFG_FLAG_SKIP_MATCH, it leads to unaccessible
counters after the first use.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
lib/sbi/sbi_pmu.c