From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbdBXQPW (ORCPT ); Fri, 24 Feb 2017 11:15:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48122 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbdBXQPB (ORCPT ); Fri, 24 Feb 2017 11:15:01 -0500 From: Vitaly Kuznetsov To: xen-devel@lists.xenproject.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Boris Ostrovsky , Juergen Gross , Andrew Jones Subject: [PATCH 4/5] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV Date: Fri, 24 Feb 2017 17:14:39 +0100 Message-Id: <20170224161440.2136-5-vkuznets@redhat.com> In-Reply-To: <20170224161440.2136-1-vkuznets@redhat.com> References: <20170224161440.2136-1-vkuznets@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 24 Feb 2017 16:14:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 5 +++-- arch/x86/xen/pmu.h | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 9ebfd77..aa8256b 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 3bf840e..10264ed 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -13,9 +13,10 @@ CFLAGS_mmu_pv.o := $(nostackp) obj-y := enlighten.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.o + mmu.o -obj-$(CONFIG_XEN_PV) += enlighten_pv.o setup.o mmu_pv.o p2m.o +obj-$(CONFIG_XEN_PV) += enlighten_pv.o setup.o mmu_pv.o p2m.o \ + apic.o pmu.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.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 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); -- 2.9.3