diff options
author | Ley Foon Tan <leyfoon.tan@starfivetech.com> | 2023-07-06 09:30:28 +0300 |
---|---|---|
committer | Ley Foon Tan <leyfoon.tan@starfivetech.com> | 2023-08-30 04:54:17 +0300 |
commit | a10e0837f215fb4ed25f195f2c511a41deb9c324 (patch) | |
tree | 1c7d10d11e136437b4be583c80032e364bd43165 | |
parent | 3b7a16171029ca0a185789ca7cba583a5bf31b19 (diff) | |
download | opensbi-a10e0837f215fb4ed25f195f2c511a41deb9c324.tar.xz |
lib: sbi: Fix Priv spec version for [m|s]counteren and mcountinhibit CSRsREL_DUBHE_SEPT2023
[ Upstream commit 976895c57e3b0655466e20c6eb0d7c670b9e8452 ]
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>
-rw-r--r-- | lib/sbi/sbi_hart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 5447c52..bcb5c54 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -657,7 +657,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) |