summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAtish Patra <atishp@rivosinc.com>2025-09-09 10:03:24 +0300
committerAnup Patel <anup@brainfault.org>2025-09-16 09:19:31 +0300
commit880fcc329e2473ba02ffbc446fcd403972ab1fca (patch)
treeae5434d07774b7beae4a9966ade775eafafff0d6 /include/linux
parentadffbd06d0036a1f2d8424ecc22d37ca38709012 (diff)
downloadlinux-880fcc329e2473ba02ffbc446fcd403972ab1fca.tar.xz
drivers/perf: riscv: Export PMU event info function
The event mapping function can be used in event info function to find out the corresponding SBI PMU event encoding during the get_event_info function as well. Refactor and export it so that it can be invoked from kvm and internal driver. 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-5-d8f80cacb884@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/perf/riscv_pmu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/perf/riscv_pmu.h b/include/linux/perf/riscv_pmu.h
index 701974639ff2..f82a28040594 100644
--- a/include/linux/perf/riscv_pmu.h
+++ b/include/linux/perf/riscv_pmu.h
@@ -89,6 +89,7 @@ static inline void riscv_pmu_legacy_skip_init(void) {};
struct riscv_pmu *riscv_pmu_alloc(void);
#ifdef CONFIG_RISCV_PMU_SBI
int riscv_pmu_get_hpm_info(u32 *hw_ctr_width, u32 *num_hw_ctr);
+int riscv_pmu_get_event_info(u32 type, u64 config, u64 *econfig);
#endif
#endif /* CONFIG_RISCV_PMU */