@@ -6,7 +6,6 @@ config XEN
bool "Xen guest support"
depends on PARAVIRT
select PARAVIRT_CLOCK
- select XEN_HAVE_VPMU
depends on X86_64 || (X86_32 && X86_PAE)
depends on X86_LOCAL_APIC && X86_TSC
help
@@ -18,6 +17,7 @@ config XEN_PV
bool "Xen PV guest support"
default y
depends on XEN
+ select XEN_HAVE_VPMU
help
Support running as a Xen PV guest.
@@ -13,9 +13,9 @@ CFLAGS_mmu.o := $(nostackp)
obj-y := enlighten_common.o multicalls.o \
irq.o time.o xen-asm.o xen-asm_$(BITS).o \
grant-table.o suspend.o platform-pci-unplug.o \
- apic.o pmu.o mmu_common.o
+ mmu_common.o
-obj-$(CONFIG_XEN_PV) += enlighten.o setup.o mmu.o p2m.o
+obj-$(CONFIG_XEN_PV) += enlighten.o setup.o mmu.o p2m.o pmu.o apic.o
obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o
obj-$(CONFIG_EVENT_TRACING) += trace.o
@@ -4,8 +4,13 @@
#include <xen/interface/xenpmu.h>
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
+#ifdef CONFIG_XEN_HAVE_VPMU
void xen_pmu_init(int cpu);
void xen_pmu_finish(int cpu);
+#else
+static inline void xen_pmu_init(int cpu) {}
+static inline void xen_pmu_finish(int cpu) {}
+#endif
bool is_xen_pmu(int cpu);
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);
xen_pmu_init/finish() functions are used in suspend.c and enlighten_common.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 4 ++-- arch/x86/xen/pmu.h | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-)