blob: 4be5355b56f74264727fbb9d678be54cbc38e794 [file] [log] [blame]
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -04001#ifndef __XEN_PMU_H
2#define __XEN_PMU_H
3
4#include <xen/interface/xenpmu.h>
5
6irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
Vitaly Kuznetsov50a10622017-03-14 18:35:50 +01007#ifdef CONFIG_XEN_HAVE_VPMU
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -04008void xen_pmu_init(int cpu);
9void xen_pmu_finish(int cpu);
Vitaly Kuznetsov50a10622017-03-14 18:35:50 +010010#else
11static inline void xen_pmu_init(int cpu) {}
12static inline void xen_pmu_finish(int cpu) {}
13#endif
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -040014bool is_xen_pmu(int cpu);
Boris Ostrovsky6b08cd62015-08-10 16:34:36 -040015bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
16bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
17int pmu_apic_update(uint32_t reg);
18unsigned long long xen_read_pmc(int counter);
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -040019
20#endif /* __XEN_PMU_H */