Boris Ostrovsky | 65d0cf0 | 2015-08-10 16:34:34 -0400 | [diff] [blame] | 1 | #ifndef __XEN_PMU_H |
| 2 | #define __XEN_PMU_H |
| 3 | |
| 4 | #include <xen/interface/xenpmu.h> |
| 5 | |
| 6 | irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id); |
Vitaly Kuznetsov | 50a1062 | 2017-03-14 18:35:50 +0100 | [diff] [blame] | 7 | #ifdef CONFIG_XEN_HAVE_VPMU |
Boris Ostrovsky | 65d0cf0 | 2015-08-10 16:34:34 -0400 | [diff] [blame] | 8 | void xen_pmu_init(int cpu); |
| 9 | void xen_pmu_finish(int cpu); |
Vitaly Kuznetsov | 50a1062 | 2017-03-14 18:35:50 +0100 | [diff] [blame] | 10 | #else |
| 11 | static inline void xen_pmu_init(int cpu) {} |
| 12 | static inline void xen_pmu_finish(int cpu) {} |
| 13 | #endif |
Boris Ostrovsky | 65d0cf0 | 2015-08-10 16:34:34 -0400 | [diff] [blame] | 14 | bool is_xen_pmu(int cpu); |
Boris Ostrovsky | 6b08cd6 | 2015-08-10 16:34:36 -0400 | [diff] [blame] | 15 | bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err); |
| 16 | bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err); |
| 17 | int pmu_apic_update(uint32_t reg); |
| 18 | unsigned long long xen_read_pmc(int counter); |
Boris Ostrovsky | 65d0cf0 | 2015-08-10 16:34:34 -0400 | [diff] [blame] | 19 | |
| 20 | #endif /* __XEN_PMU_H */ |