lib: sbi: Reset the mhpmevent value upon counter reset
authorAtish Patra <atish.patra@wdc.com>
Mon, 8 Nov 2021 18:53:03 +0000 (10:53 -0800)
committerAnup Patel <anup@brainfault.org>
Thu, 11 Nov 2021 12:20:32 +0000 (17:50 +0530)
commit1e147324f0f82a9982b65b1fa2e97e6b5d5e57fe
tree1644b54b20f0b03b7b01dfc0aec88aacee46527a
parent0c304b661965d81ba2194b54a0c71f4c2e5cab16
lib: sbi: Reset the mhpmevent value upon counter reset

The hardware solely relies on the event selector value in mhpmevent
to figure out what event to monitor using that counter. It should be
reset when counter reset happens.

Reviewed-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
lib/sbi/sbi_pmu.c