lib: sbi_pmu: add callback for counter width
authorMayuresh Chitale <mchitale@ventanamicro.com>
Thu, 9 Mar 2023 13:13:51 +0000 (18:43 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 10 Mar 2023 08:16:52 +0000 (13:46 +0530)
commit1fe8dc995566d869836d3caf37e427c28536f453
treeab708c7d847836efb1a8f6b6a263b6233713f0ed
parent506144f398b7911a2395d127fb6a64082a4a79cc
lib: sbi_pmu: add callback for counter width

This patch adds a callback to fetch the number of bits implemented for a
custom firmware counter. If the callback fails or is not implemented then
width defaults to 63.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
include/sbi/sbi_pmu.h
lib/sbi/sbi_pmu.c