blob: 0e83a160589bc2e6c9149bbbae7e049c08e0e8c0 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -04002#ifndef __XEN_PMU_H
3#define __XEN_PMU_H
4
5#include <xen/interface/xenpmu.h>
6
7irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
Vitaly Kuznetsov50a10622017-03-14 18:35:50 +01008#ifdef CONFIG_XEN_HAVE_VPMU
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -04009void xen_pmu_init(int cpu);
10void xen_pmu_finish(int cpu);
Vitaly Kuznetsov50a10622017-03-14 18:35:50 +010011#else
12static inline void xen_pmu_init(int cpu) {}
13static inline void xen_pmu_finish(int cpu) {}
14#endif
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -040015bool is_xen_pmu(int cpu);
Boris Ostrovsky6b08cd62015-08-10 16:34:36 -040016bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
17bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
18int pmu_apic_update(uint32_t reg);
19unsigned long long xen_read_pmc(int counter);
Boris Ostrovsky65d0cf02015-08-10 16:34:34 -040020
21#endif /* __XEN_PMU_H */