diff options
author | Atish Patra <atishp@rivosinc.com> | 2022-07-21 00:50:35 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-07-30 08:58:36 +0300 |
commit | 11c0008862e6d8c3220b0ee46d531796eb267d8e (patch) | |
tree | f9d72688724e7c299b777ee0d168b264240a9b2a | |
parent | 860a376817f687db31b586ec7bcf9a1db1bce7b3 (diff) | |
download | opensbi-11c0008862e6d8c3220b0ee46d531796eb267d8e.tar.xz |
lib: sbi: Fix fw_event_map initialization
fw_event_map represents array of firmware events. It should initialized
for maximum number of firmware events not counters.
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
-rw-r--r-- | lib/sbi/sbi_pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_pmu.c b/lib/sbi/sbi_pmu.c index 5d31f58..5a294a2 100644 --- a/lib/sbi/sbi_pmu.c +++ b/lib/sbi/sbi_pmu.c @@ -769,7 +769,7 @@ static void pmu_reset_event_map(u32 hartid) /* Initialize the counter to event mapping table */ for (j = 3; j < total_ctrs; j++) active_events[hartid][j] = SBI_PMU_EVENT_IDX_INVALID; - for (j = 0; j < SBI_PMU_FW_CTR_MAX; j++) + for (j = 0; j < SBI_PMU_FW_EVENT_MAX; j++) sbi_memset(&fw_event_map[hartid][j], 0, sizeof(struct sbi_pmu_fw_event)); } |