xref: /openbmc/linux/arch/x86/xen/pmu.h (revision aadaeca4)
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 extern bool is_xen_pmu;
8 
9 irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
10 #ifdef CONFIG_XEN_HAVE_VPMU
11 void xen_pmu_init(int cpu);
12 void xen_pmu_finish(int cpu);
13 #else
14 static inline void xen_pmu_init(int cpu) {}
15 static inline void xen_pmu_finish(int cpu) {}
16 #endif
17 bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
18 bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
19 int pmu_apic_update(uint32_t reg);
20 unsigned long long xen_read_pmc(int counter);
21 
22 #endif /* __XEN_PMU_H */
23