summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaiwen Xue <kaiwenx@rivosinc.com>2023-08-03 21:34:15 +0300
committerAnup Patel <anup@brainfault.org>2023-08-06 07:52:58 +0300
commitf46a5643bc4a524975261b694814bf5d14bc2d71 (patch)
treeab2364b2b0287d789df71517ef14de055629e63c
parent6259b2ec2d095a059c89237551839c0fe8bd5bd7 (diff)
downloadopensbi-f46a5643bc4a524975261b694814bf5d14bc2d71.tar.xz
lib: sbi: Fix typo for finding fixed event counter
Cycle and instructions are hardware events instead of firmware ones. Fix the typo in the name of this function. Signed-off-by: Kaiwen Xue <kaiwenx@andrew.cmu.edu> Signed-off-by: Kaiwen Xue <kaiwenx@rivosinc.com> Reviewed-by: Anup patel <anup@brainfault.org>
-rw-r--r--lib/sbi/sbi_pmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi/sbi_pmu.c b/lib/sbi/sbi_pmu.c
index cc8a88e..adb9f18 100644
--- a/lib/sbi/sbi_pmu.c
+++ b/lib/sbi/sbi_pmu.c
@@ -608,7 +608,7 @@ static int pmu_update_hw_mhpmevent(struct sbi_pmu_hw_event *hw_evt, int ctr_idx,
return 0;
}
-static int pmu_ctr_find_fixed_fw(unsigned long evt_idx_code)
+static int pmu_ctr_find_fixed_hw(unsigned long evt_idx_code)
{
/* Non-programmables counters are enabled always. No need to do lookup */
if (evt_idx_code == SBI_PMU_HW_CPU_CYCLES)
@@ -637,7 +637,7 @@ static int pmu_ctr_find_hw(struct sbi_pmu_hart_state *phs,
* If Sscof is present try to find the programmable counter for
* cycle/instret as well.
*/
- fixed_ctr = pmu_ctr_find_fixed_fw(event_idx);
+ fixed_ctr = pmu_ctr_find_fixed_hw(event_idx);
if (fixed_ctr >= 0 &&
!sbi_hart_has_extension(scratch, SBI_HART_EXT_SSCOFPMF))
return fixed_ctr;