aboutsummaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_hart.c
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2023-07-05 12:34:31 +0530
committerAnup Patel <anup@brainfault.org>2023-07-09 11:06:30 +0530
commit5359fc69552ffa270b95c2935ef4407b050c43cb (patch)
tree18e6808169e94262ac9b3e8374ccab0b1b9d7624 /lib/sbi/sbi_hart.c
parent72b9c8ff89a963bcec0a7f41fc679ee5246efd01 (diff)
downloadopensbi-5359fc69552ffa270b95c2935ef4407b050c43cb.zip
opensbi-5359fc69552ffa270b95c2935ef4407b050c43cb.tar.gz
opensbi-5359fc69552ffa270b95c2935ef4407b050c43cb.tar.bz2
lib: sbi: Rename hart_pmu_get_allowed_bits() function
The hart_pmu_get_allowed_bits() function detects implemented bits of mhpm counters so let us rename this function accordingly. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r--lib/sbi/sbi_hart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index 2eacefb..e9b2b27 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -527,7 +527,7 @@ static unsigned long hart_pmp_get_allowed_addr(void)
return val;
}
-static int hart_pmu_get_allowed_bits(void)
+static int hart_mhpm_get_allowed_bits(void)
{
unsigned long val = ~(0UL);
struct sbi_trap_info trap = {0};
@@ -628,7 +628,7 @@ __pmp_skip:
/* Detect number of MHPM counters */
__check_csr(CSR_MHPMCOUNTER3, 0, 1UL, mhpm_count, __mhpm_skip);
- hfeatures->mhpm_bits = hart_pmu_get_allowed_bits();
+ hfeatures->mhpm_bits = hart_mhpm_get_allowed_bits();
__check_csr_4(CSR_MHPMCOUNTER4, 0, 1UL, mhpm_count, __mhpm_skip);
__check_csr_8(CSR_MHPMCOUNTER8, 0, 1UL, mhpm_count, __mhpm_skip);