blob: 0e83a160589bc2e6c9149bbbae7e049c08e0e8c0 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* SPDX-License-Identifier: GPL-2.0 */
2#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);
8#ifdef CONFIG_XEN_HAVE_VPMU
9void xen_pmu_init(int cpu);
10void xen_pmu_finish(int cpu);
11#else
12static inline void xen_pmu_init(int cpu) {}
13static inline void xen_pmu_finish(int cpu) {}
14#endif
15bool is_xen_pmu(int cpu);
16bool 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);
20
21#endif /* __XEN_PMU_H */