2015-08-11 03:34:34 +07:00
|
|
|
#ifndef __XEN_PMU_H
|
|
|
|
#define __XEN_PMU_H
|
|
|
|
|
|
|
|
#include <xen/interface/xenpmu.h>
|
|
|
|
|
|
|
|
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
|
2017-03-15 00:35:50 +07:00
|
|
|
#ifdef CONFIG_XEN_HAVE_VPMU
|
2015-08-11 03:34:34 +07:00
|
|
|
void xen_pmu_init(int cpu);
|
|
|
|
void xen_pmu_finish(int cpu);
|
2017-03-15 00:35:50 +07:00
|
|
|
#else
|
|
|
|
static inline void xen_pmu_init(int cpu) {}
|
|
|
|
static inline void xen_pmu_finish(int cpu) {}
|
|
|
|
#endif
|
2015-08-11 03:34:34 +07:00
|
|
|
bool is_xen_pmu(int cpu);
|
2015-08-11 03:34:36 +07:00
|
|
|
bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
|
|
|
|
bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
|
|
|
|
int pmu_apic_update(uint32_t reg);
|
|
|
|
unsigned long long xen_read_pmc(int counter);
|
2015-08-11 03:34:34 +07:00
|
|
|
|
|
|
|
#endif /* __XEN_PMU_H */
|