lib: sbi: Use csr_read/write_num to read/update PMU counters
authorAtish Patra <atish.patra@wdc.com>
Sat, 10 Jul 2021 16:18:09 +0000 (09:18 -0700)
committerAnup Patel <anup@brainfault.org>
Sun, 11 Jul 2021 04:50:44 +0000 (10:20 +0530)
commit49966db30658a3d5070e1a10200bd8c73dab0851
treed74530cded4b0071f4821d5fc7fded6b52069c45
parentfd9116bd46e59ef8fbeaa147bb102527635615ba
lib: sbi: Use csr_read/write_num to read/update PMU counters

Currently, csr_read/write_num functions are used to read/write PMP related
CSRs where CSR value is decided at runtime. Expand this function to include
PMU related CSRs as well.

Reviewed-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
lib/sbi/riscv_asm.c