forked from Mirrors/opensbi
lib: sbi: pmu: add the PMU SSE event only if overflow IRQ is supported
Add the PMU SSE event only if an overflow irq bit is present. Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:

committed by
Anup Patel

parent
ecab71e19a
commit
5c7e2c8334
@@ -1165,7 +1165,8 @@ int sbi_pmu_init(struct sbi_scratch *scratch, bool cold_boot)
|
||||
|
||||
total_ctrs = num_hw_ctrs + SBI_PMU_FW_CTR_MAX;
|
||||
|
||||
sbi_sse_add_event(SBI_SSE_EVENT_LOCAL_PMU, &pmu_sse_cb_ops);
|
||||
if (sbi_pmu_irq_bit() >= 0)
|
||||
sbi_sse_add_event(SBI_SSE_EVENT_LOCAL_PMU, &pmu_sse_cb_ops);
|
||||
}
|
||||
|
||||
phs = pmu_get_hart_state_ptr(scratch);
|
||||
|
Reference in New Issue
Block a user