aboutsummaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_hart.c
diff options
context:
space:
mode:
authorLey Foon Tan <leyfoon.tan@starfivetech.com>2023-07-06 14:30:28 +0800
committerAnup Patel <anup@brainfault.org>2023-07-09 11:08:35 +0530
commit976895c57e3b0655466e20c6eb0d7c670b9e8452 (patch)
treed14856b07c0edd9d14165d936eb08371279fb19a /lib/sbi/sbi_hart.c
parent5359fc69552ffa270b95c2935ef4407b050c43cb (diff)
downloadopensbi-976895c57e3b0655466e20c6eb0d7c670b9e8452.zip
opensbi-976895c57e3b0655466e20c6eb0d7c670b9e8452.tar.gz
opensbi-976895c57e3b0655466e20c6eb0d7c670b9e8452.tar.bz2
lib: sbi: Fix Priv spec version for [m|s]counteren and mcountinhibit CSRs
Fix Priv spec version typo in commit d4b563c881d6 ("lib: sbi: Remove MCOUNTEREN and SCOUNTEREN hart features"). At least Priv spec v1.11 is required for [m|s]counteren and mcountinhibit CSRs. Fixes: d4b563c881d6 ("lib: sbi: Remove MCOUNTEREN and SCOUNTEREN hart features") Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r--lib/sbi/sbi_hart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index e9b2b27..0c27fd7 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -667,7 +667,7 @@ __mhpm_skip:
hfeatures->priv_version = SBI_HART_PRIV_VER_1_12;
/* Counter overflow/filtering is not useful without mcounter/inhibit */
- if (hfeatures->priv_version >= SBI_HART_PRIV_VER_1_12) {
+ if (hfeatures->priv_version >= SBI_HART_PRIV_VER_1_11) {
/* Detect if hart supports sscofpmf */
csr_read_allowed(CSR_SCOUNTOVF, (unsigned long)&trap);
if (!trap.cause)