1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 265d0cf0bSBoris Ostrovsky #ifndef __XEN_PMU_H 365d0cf0bSBoris Ostrovsky #define __XEN_PMU_H 465d0cf0bSBoris Ostrovsky 565d0cf0bSBoris Ostrovsky #include <xen/interface/xenpmu.h> 665d0cf0bSBoris Ostrovsky 7*de2ae403SJuergen Gross extern bool is_xen_pmu; 8*de2ae403SJuergen Gross 965d0cf0bSBoris Ostrovsky irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id); 1050a1062dSVitaly Kuznetsov #ifdef CONFIG_XEN_HAVE_VPMU 1165d0cf0bSBoris Ostrovsky void xen_pmu_init(int cpu); 1265d0cf0bSBoris Ostrovsky void xen_pmu_finish(int cpu); 1350a1062dSVitaly Kuznetsov #else xen_pmu_init(int cpu)1450a1062dSVitaly Kuznetsovstatic inline void xen_pmu_init(int cpu) {} xen_pmu_finish(int cpu)1550a1062dSVitaly Kuznetsovstatic inline void xen_pmu_finish(int cpu) {} 1650a1062dSVitaly Kuznetsov #endif 176b08cd63SBoris Ostrovsky bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err); 186b08cd63SBoris Ostrovsky bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err); 196b08cd63SBoris Ostrovsky int pmu_apic_update(uint32_t reg); 206b08cd63SBoris Ostrovsky unsigned long long xen_read_pmc(int counter); 2165d0cf0bSBoris Ostrovsky 2265d0cf0bSBoris Ostrovsky #endif /* __XEN_PMU_H */ 23