]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drivers/perf: riscv: Implement PMU event info function
authorAtish Patra <atishp@rivosinc.com>
Tue, 9 Sep 2025 07:03:23 +0000 (00:03 -0700)
committerAnup Patel <anup@brainfault.org>
Tue, 16 Sep 2025 06:19:31 +0000 (11:49 +0530)
commitadffbd06d0036a1f2d8424ecc22d37ca38709012
treefb6e1f4106c880a92801977eb49ce5f5ee519e00
parent190b74154299d210de7937d7325571fc3fa37383
drivers/perf: riscv: Implement PMU event info function

With the new SBI PMU event info function, we can query the availability
of the all standard SBI PMU events at boot time with a single ecall.
This improves the bootime by avoiding making an SBI call for each
standard PMU event. Since this function is defined only in SBI v3.0,
invoke this only if the underlying SBI implementation is v3.0 or higher.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Acked-by: Paul Walmsley <pjw@kernel.org>
Link: https://lore.kernel.org/r/20250909-pmu_event_info-v6-4-d8f80cacb884@rivosinc.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/sbi.h
drivers/perf/riscv_pmu_sbi.c