From patchwork Mon Nov 14 17:17:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 9428055 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 483456047D for ; Mon, 14 Nov 2016 17:20:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32E9928A66 for ; Mon, 14 Nov 2016 17:20:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2538F28AA3; Mon, 14 Nov 2016 17:20:21 +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 3828C28A66 for ; Mon, 14 Nov 2016 17:20:09 +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 1c6KtQ-0003vq-0l; Mon, 14 Nov 2016 17:18:04 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6KtO-0003u9-Ns for xen-devel@lists.xenproject.org; Mon, 14 Nov 2016 17:18:02 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id F6/7A-14841-9C1F9285; Mon, 14 Nov 2016 17:18:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrALMWRWlGSWpSXmKPExsVysWW7jO7Jj5o RBu8niFl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBlNlzYzFjQIVLT9m8/UwHiRt4uRi0NIYBeT xI2rT5khnCOMEutnXGPtYuTkYBPQkfj+9BQziC0ioCRxb9VkJpAiZoE9jBJbPyxj7GLk4BAWi JI4caEGpIZFQFWi6dBmdhCbV8BZYsPSzWBzOAVcJGZPmQUWFwKKL/m8DMyWENCWeH5hMjvITA mBPkaJhv6jTBMYeRYwMqxi1ChOLSpLLdI1MtJLKspMzyjJTczM0TU0MNXLTS0uTkxPzUlMKtZ Lzs/dxAj0fT0DA+MOxj3tfocYJTmYlER5O29oRgjxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4M39 AJQTLEpNT61Iy8wBBiFMWoKDR0mEVxIYiEK8xQWJucWZ6RCpU4y6HG92vXzAJMSSl5+XKiXO2 wkyQwCkKKM0D24ELCIuMcpKCfMyMjAwCPEUpBblZpagyr9iFOdgVBLmPQEyhSczrwRu0yugI5 iAjthlrgFyREkiQkqqgbHbrYBpxh2lWY/eSjzmqZAPKvyXKdAXH3lKd67bWkZmJrHDr8o/vml xjgp+t2S3y+nfU2bz7lI4sMsnmTE1869fVUXu3XtlkT8XMbHNFJ0kY+eQsPtlyabFU91sYvV/ l5p9WenNt7sjSDxs1pUJbXP/56V+brtXZTjxxPV1G2sk4g/bq1pPmKLEUpyRaKjFXFScCADQD JdDgwIAAA== X-Env-Sender: vkuznets@redhat.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1479143879!53073824!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.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 52296 invoked from network); 14 Nov 2016 17:18:01 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-10.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Nov 2016 17:18:01 -0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 9F2B064D2; Mon, 14 Nov 2016 17:17:59 +0000 (UTC) Received: from vitty.brq.redhat.com (vitty.brq.redhat.com [10.34.26.3]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAEHHoNX006170; Mon, 14 Nov 2016 12:17:58 -0500 From: Vitaly Kuznetsov To: xen-devel@lists.xenproject.org Date: Mon, 14 Nov 2016 18:17:49 +0100 Message-Id: <1479143869-27611-5-git-send-email-vkuznets@redhat.com> In-Reply-To: <1479143869-27611-1-git-send-email-vkuznets@redhat.com> References: <1479143869-27611-1-git-send-email-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 14 Nov 2016 17:17:59 +0000 (UTC) Cc: Juergen Gross , Boris Ostrovsky , x86@kernel.org, Andrew Jones , David Vrabel Subject: [Xen-devel] [RFC PATCH KERNEL 4/4] 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_common.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov --- arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 4 ++-- arch/x86/xen/pmu.h | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) 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 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);