mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: sbi_pmu: Fix the sanity check condition for hw event map
The hardware event map function invoked from platform code should
exclude any raw events as there is a separate function for the raw
events.
Fixes: d8a483fc7f
("lib: sbi_pmu: PMU raw event v2 support")
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -293,8 +293,8 @@ reset_event:
|
||||
*/
|
||||
int sbi_pmu_add_hw_event_counter_map(u32 eidx_start, u32 eidx_end, u32 cmap)
|
||||
{
|
||||
if ((eidx_start > eidx_end) || eidx_start >= SBI_PMU_EVENT_RAW_V2_IDX ||
|
||||
eidx_end >= SBI_PMU_EVENT_RAW_V2_IDX)
|
||||
if ((eidx_start > eidx_end) || eidx_start >= SBI_PMU_EVENT_RAW_IDX ||
|
||||
eidx_end >= SBI_PMU_EVENT_RAW_IDX)
|
||||
return SBI_EINVAL;
|
||||
|
||||
return pmu_add_hw_event_map(eidx_start, eidx_end, cmap, 0, 0);
|
||||
|
Reference in New Issue
Block a user