aboutsummaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ecall_pmu.c
diff options
context:
space:
mode:
authorAtish Patra <atishp@rivosinc.com>2023-12-07 14:23:49 -0800
committerAnup Patel <anup@brainfault.org>2023-12-08 22:50:21 +0530
commitee725174bada254f8a081937d870feb837618d6e (patch)
tree12030a822aaa6cec70ed38aabd019cd860ce9eb7 /lib/sbi/sbi_ecall_pmu.c
parent93da66b7d40605c3288ba05e70de8ef1914cdb60 (diff)
downloadopensbi-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.c2
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;
}