forked from Mirrors/opensbi
		
	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>
This commit is contained in:
		@@ -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));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user