From patchwork Thu Aug 10 12:52:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 9893679 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 BC47B60236 for ; Thu, 10 Aug 2017 12:55:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD42B28ABA for ; Thu, 10 Aug 2017 12:55:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1DB728AC6; Thu, 10 Aug 2017 12:55:23 +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 3158E28ABA for ; Thu, 10 Aug 2017 12:55:23 +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 1dfmxT-0007e2-0m; Thu, 10 Aug 2017 12:53:03 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfmxR-0007dK-R9 for xen-devel@lists.xenproject.org; Thu, 10 Aug 2017 12:53:01 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id 29/78-03557-D275C895; Thu, 10 Aug 2017 12:53:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRWlGSWpSXmKPExsVyuP0Ov65OeE+ kwY8fKhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8ahbW3MBeekK5rOv2NpYLws3sXIySEhYCTx duI/pi5GLg4hgYWMErtaOplBEmwCqhIbrp9iBbFFBIIkNnS0ghUxC6xilHi8oYkJJCEsYC2x4 sUSdhCbBahhxafdjCA2r4CxxNn3W5ggNshLdByYzAJicwqYSHxdsh+sRgio5u+LZ2wTGLkXMD KsYtQoTi0qSy3SNTTQSyrKTM8oyU3MzAHyzPRyU4uLE9NTcxKTivWS83M3MQI9zAAEOxiPv48 7xCjJwaQkylv8qTtSiC8pP6UyI7E4I76oNCe1+BCjDAeHkgTvu9CeSCHBotT01Iq0zBxgqMGk JTh4lER4jUHSvMUFibnFmekQqVOMuhyvJvz/xiTEkpeflyolzisbBlQkAFKUUZoHNwIW9pcYZ aWEeRmBjhLiKUgtys0sQZV/xSjOwagkzHsSZBVPZl4J3KZXQEcwAR0R4dsJckRJIkJKqoHRLL Wtz+NT+G3TDZ85NpbxSJpW+tw7Pssw9ma/zCz274yX1z5LW9I+fWvolbgAB7UfGbHfG8+zBHp 9uPvK8qbRww9dCi+rux/Uffu9aJHcsbJD4U+mbhfr0rTic2p97XC7WfNZipXDtLZTulxV83ds 3B2Rkr/neUaTRuPUx0bSC/v2/J7AlJapxFKckWioxVxUnAgA2dbNvXYCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1502369580!77374220!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41000 invoked from network); 10 Aug 2017 12:53:00 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-7.tower-21.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 10 Aug 2017 12:53:00 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2D336AE74; Thu, 10 Aug 2017 12:53:00 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Date: Thu, 10 Aug 2017 14:52:54 +0200 Message-Id: <20170810125254.1347-4-jgross@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170810125254.1347-1-jgross@suse.com> References: <20170810125254.1347-1-jgross@suse.com> Cc: Juergen Gross , lguest@lists.ozlabs.org, rusty@rustcorp.com.au, mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH 3/3] x86/vsmp: remove vsmp paravirt support 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 vSMP has seen its last functional patch more than 3 years ago. It is not clear whether the vSMP paravirtualized irq functions are still needed. Remove them as they seem to be optional and their existence is blocking some simplification work of paravirt infrastructure. Signed-off-by: Juergen Gross --- arch/x86/Kconfig | 1 - arch/x86/kernel/vsmp_64.c | 69 +---------------------------------------------- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 3fac2570a2e1..13a3d8744ae4 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -495,7 +495,6 @@ config X86_NUMACHIP config X86_VSMP bool "ScaleMP vSMP" select HYPERVISOR_GUEST - select PARAVIRT depends on X86_64 && PCI depends on X86_EXTENDED_PLATFORM depends on SMP diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index b034b1b14b9c..5d392b809ee4 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #define TOPOLOGY_REGISTER_OFFSET 0x10 @@ -29,64 +28,7 @@ /* Flag below is initialized once during vSMP PCI initialization. */ static int irq_routing_comply = 1; -#if defined CONFIG_PCI && defined CONFIG_PARAVIRT -/* - * Interrupt control on vSMPowered systems: - * ~AC is a shadow of IF. If IF is 'on' AC should be 'off' - * and vice versa. - */ - -asmlinkage __visible unsigned long vsmp_save_fl(void) -{ - unsigned long flags = native_save_fl(); - - if (!(flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC)) - flags &= ~X86_EFLAGS_IF; - return flags; -} -PV_CALLEE_SAVE_REGS_THUNK(vsmp_save_fl); - -__visible void vsmp_restore_fl(unsigned long flags) -{ - if (flags & X86_EFLAGS_IF) - flags &= ~X86_EFLAGS_AC; - else - flags |= X86_EFLAGS_AC; - native_restore_fl(flags); -} -PV_CALLEE_SAVE_REGS_THUNK(vsmp_restore_fl); - -asmlinkage __visible void vsmp_irq_disable(void) -{ - unsigned long flags = native_save_fl(); - - native_restore_fl((flags & ~X86_EFLAGS_IF) | X86_EFLAGS_AC); -} -PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_disable); - -asmlinkage __visible void vsmp_irq_enable(void) -{ - unsigned long flags = native_save_fl(); - - native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); -} -PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_enable); - -static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf, - unsigned long addr, unsigned len) -{ - switch (type) { - case PARAVIRT_PATCH(pv_irq_ops.irq_enable): - case PARAVIRT_PATCH(pv_irq_ops.irq_disable): - case PARAVIRT_PATCH(pv_irq_ops.save_fl): - case PARAVIRT_PATCH(pv_irq_ops.restore_fl): - return paravirt_patch_default(type, clobbers, ibuf, addr, len); - default: - return native_patch(type, clobbers, ibuf, addr, len); - } - -} - +#if defined CONFIG_PCI static void __init set_vsmp_pv_ops(void) { void __iomem *address; @@ -115,15 +57,6 @@ static void __init set_vsmp_pv_ops(void) } #endif - if (cap & ctl & (1 << 4)) { - /* Setup irq ops and turn on vSMP IRQ fastpath handling */ - pv_irq_ops.irq_disable = PV_CALLEE_SAVE(vsmp_irq_disable); - pv_irq_ops.irq_enable = PV_CALLEE_SAVE(vsmp_irq_enable); - pv_irq_ops.save_fl = PV_CALLEE_SAVE(vsmp_save_fl); - pv_irq_ops.restore_fl = PV_CALLEE_SAVE(vsmp_restore_fl); - pv_init_ops.patch = vsmp_patch; - ctl &= ~(1 << 4); - } writel(ctl, address + 4); ctl = readl(address + 4); pr_info("vSMP CTL: control set to:0x%08x\n", ctl);