History

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.

Atish Patra committed 1 year ago

Commit 880fcc31 parent adffbd02 files · +68 −55Browse files

Showing the changes to include/linux/perf (1 of 2 files). Show all

Unified · Split

include/linux/perf/riscv_pmu.h+1−0
@@ -89,6 +89,7 @@ static inline void riscv_pmu_legacy_skip_init(void) {}; · 88 unmodified lines
8989 struct riscv_pmu *riscv_pmu_alloc(void);
9090 #ifdef CONFIG_RISCV_PMU_SBI
9191 int riscv_pmu_get_hpm_info(u32 *hw_ctr_width, u32 *num_hw_ctr);
92+int riscv_pmu_get_event_info(u32 type, u64 config, u64 *econfig);
9293 #endif
9394
9495 #endif /* CONFIG_RISCV_PMU */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t