mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
lib: utils: fdt_pmu: Do not iterate over the fdt_pmu_evt_select table
The valid entry count is tracking by hw_event_count so there is no need to check the whole table. Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
0308f93dc4
commit
e19d419f15
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ uint64_t fdt_pmu_get_select_value(uint32_t event_idx)
|
|||
int i;
|
||||
struct fdt_pmu_hw_event_select_map *event;
|
||||
|
||||
for (i = 0; i < SBI_PMU_HW_EVENT_MAX; i++) {
|
||||
for (i = 0; i < hw_event_count; i++) {
|
||||
event = &fdt_pmu_evt_select[i];
|
||||
if (event->eidx == event_idx)
|
||||
return event->select;
|
||||
|
|
Loading…
Add table
Reference in a new issue