xref: /openbmc/linux/arch/x86/xen/pmu.h (revision 20e2fc42)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __XEN_PMU_H
3 #define __XEN_PMU_H
4 
5 #include <xen/interface/xenpmu.h>
6 
7 irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
8 #ifdef CONFIG_XEN_HAVE_VPMU
9 void xen_pmu_init(int cpu);
10 void xen_pmu_finish(int cpu);
11 #else
12 static inline void xen_pmu_init(int cpu) {}
13 static inline void xen_pmu_finish(int cpu) {}
14 #endif
15 bool is_xen_pmu(int cpu);
16 bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
17 bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
18 int pmu_apic_update(uint32_t reg);
19 unsigned long long xen_read_pmc(int counter);
20 
21 #endif /* __XEN_PMU_H */
22