From patchwork Thu Mar 2 17:53:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 9601275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C2B9B60453 for ; Thu, 2 Mar 2017 17:56:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8FCC285CB for ; Thu, 2 Mar 2017 17:56:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADDF5285CD; Thu, 2 Mar 2017 17:56:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 53A7C285CB for ; Thu, 2 Mar 2017 17:56:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjUvv-0003nw-04; Thu, 02 Mar 2017 17:54:31 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjUvt-0003j9-Je for xen-devel@lists.xenproject.org; Thu, 02 Mar 2017 17:54:29 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id 22/36-04971-55C58B85; Thu, 02 Mar 2017 17:54:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrALMWRWlGSWpSXmKPExsVysWW7jG5IzI4 IgymLtSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozz5/axFjQLVcxf1c3YwLiZv4uRi0NIYDeT xOPl7UwQzmFGiX3H7wI5nBxsAjoS35+eYgaxRQSUJO6tmgxWxCywiVHiQetp9i5GDg5hgRCJi T1sIDUsAqoSC6Z8AevlFbCQaPqxgh3E5gSyb066zAhiCwmYS0y6MoMVxJYQ0JY42/CLHWSmhE Afo8SxF19ZJjDyLGBkWMWoUZxaVJZapGtkpJdUlJmeUZKbmJmja2hgppebWlycmJ6ak5hUrJe cn7uJEeh7BiDYwbhmfuAhRkkOJiVRXqvoHRFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHgvRgHl BItS01Mr0jJzgEEIk5bg4FES4X0LkuYtLkjMLc5Mh0idYtTlmDN79xsmIZa8/LxUKXFeTpD5A iBFGaV5cCNgEXGJUVZKmJcR6CghnoLUotzMElT5V4ziHIxKwrz/QFbxZOaVwG16BXQEE9ARL1 S2ghxRkoiQkmpgXHSjeHl8hgTT+gP5s72WF7hunb1UZ8b/HKe0h8+qRUq0fpuLTWRP9t/EJdy h1vM3JUCme8Wswv1VOxRM0puaHmtEKgo61QnVNa8rymsLO67GJ6Tkld9vs8nJacqvnKeZJSf+ 2EWfi/iaF1p/b//yyQlyIvq8pjd0N+26Mv/MlUnVa9pifGWUWIozEg21mIuKEwFSt2sbgwIAA A== X-Env-Sender: vkuznets@redhat.com X-Msg-Ref: server-14.tower-21.messagelabs.com!1488477267!54578445!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 9.4.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 44022 invoked from network); 2 Mar 2017 17:54:28 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-14.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 Mar 2017 17:54:28 -0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27E6B80486; Thu, 2 Mar 2017 17:54:28 +0000 (UTC) Received: from vitty.brq.redhat.com (vitty.brq.redhat.com [10.34.26.3]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v22HrwkB010760; Thu, 2 Mar 2017 12:54:26 -0500 From: Vitaly Kuznetsov To: xen-devel@lists.xenproject.org Date: Thu, 2 Mar 2017 18:53:51 +0100 Message-Id: <20170302175357.8222-16-vkuznets@redhat.com> In-Reply-To: <20170302175357.8222-1-vkuznets@redhat.com> References: <20170302175357.8222-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 02 Mar 2017 17:54:28 +0000 (UTC) Cc: Juergen Gross , Boris Ostrovsky , x86@kernel.org, Andrew Jones , linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH v2 15/21] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Reviewed-by: Juergen Gross Signed-off-by: Vitaly Kuznetsov --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 6 +++--- arch/x86/xen/pmu.h | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index dae8dc6..04284d9 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 cf8d6c5..f610651 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -10,13 +10,13 @@ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_enlighten_pv.o := $(nostackp) CFLAGS_mmu_pv.o := $(nostackp) -obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ +obj-y := enlighten.o multicalls.o mmu.o irq.o \ time.o xen-asm.o xen-asm_$(BITS).o \ grant-table.o suspend.o platform-pci-unplug.o \ - p2m.o apic.o pmu.o enlighten_pv.o mmu_pv.o + p2m.o enlighten_pv.o mmu_pv.o obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o -obj-$(CONFIG_XEN_PV) += suspend_pv.o +obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o obj-$(CONFIG_XEN_PVH) += enlighten_pvh.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 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);