diff mbox

[RFC,KERNEL,4/4] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV

Message ID 1479143869-27611-5-git-send-email-vkuznets@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vitaly Kuznetsov Nov. 14, 2016, 5:17 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index e25c93e..484d6b8 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -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.
 
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index 121a368..8ec52f0 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -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
diff --git a/arch/x86/xen/pmu.h b/arch/x86/xen/pmu.h
index af5f0ad..4be5355 100644
--- a/arch/x86/xen/pmu.h
+++ b/arch/x86/xen/pmu.h
@@ -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);