diff options
| author | Atish Patra <[email protected]> | 2024-12-04 16:43:46 -0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2024-12-15 14:06:52 +0530 |
| commit | 0928ca21bcbdcc925e500b99a046e736d9792e5c (patch) | |
| tree | a8f04b5771d01d3716ad49b5a96dbf3d32e82a37 | |
| parent | 39532d11e9a5caa0304f302c782cce0df0db6cbf (diff) | |
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: d8a483fc7fd0 ("lib: sbi_pmu: PMU raw event v2 support")
Signed-off-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_pmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi/sbi_pmu.c b/lib/sbi/sbi_pmu.c index 0696ab5e..dca52eb1 100644 --- a/lib/sbi/sbi_pmu.c +++ b/lib/sbi/sbi_pmu.c @@ -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); |
