diff --git a/lib/sbi/sbi_pmu.c b/lib/sbi/sbi_pmu.c index 5d31f58d..5a294a20 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)); }