diff options
author | Atish Patra <atishp@rivosinc.com> | 2023-12-07 14:23:49 -0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-12-08 22:50:21 +0530 |
commit | ee725174bada254f8a081937d870feb837618d6e (patch) | |
tree | 12030a822aaa6cec70ed38aabd019cd860ce9eb7 /lib/sbi/sbi_ecall_pmu.c | |
parent | 93da66b7d40605c3288ba05e70de8ef1914cdb60 (diff) | |
download | opensbi-ee725174bada254f8a081937d870feb837618d6e.zip opensbi-ee725174bada254f8a081937d870feb837618d6e.tar.gz opensbi-ee725174bada254f8a081937d870feb837618d6e.tar.bz2 |
lib: sbi_pmu: Add PMU snapshot definitions
OpenSBI doesn't support SBI PMU snapshot yet as there is not much benefit
unless the multiple counters overflow at the same time.
Just add the definition and return not supported error at this moment. The
default returned error is also not supported. Thus, no functional change
intended.
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Diffstat (limited to 'lib/sbi/sbi_ecall_pmu.c')
-rw-r--r-- | lib/sbi/sbi_ecall_pmu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sbi/sbi_ecall_pmu.c b/lib/sbi/sbi_ecall_pmu.c index 1d5d512..c585911 100644 --- a/lib/sbi/sbi_ecall_pmu.c +++ b/lib/sbi/sbi_ecall_pmu.c @@ -74,6 +74,8 @@ static int sbi_ecall_pmu_handler(unsigned long extid, unsigned long funcid, case SBI_EXT_PMU_COUNTER_STOP: ret = sbi_pmu_ctr_stop(regs->a0, regs->a1, regs->a2); break; + case SBI_EXT_PMU_SNAPSHOT_SET_SHMEM: + /* fallthrough as OpenSBI doesn't support snapshot yet */ default: ret = SBI_ENOTSUPP; } |