From patchwork Tue Mar 21 19:20:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9637483 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 5B41A601E9 for ; Tue, 21 Mar 2017 19:28:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B5D427C14 for ; Tue, 21 Mar 2017 19:28:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4039B28304; Tue, 21 Mar 2017 19:28:17 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B9A7D27C14 for ; Tue, 21 Mar 2017 19:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Un3of8RmqgW7RRPn9Yc6WMCyMjOB5Hw3XlmWYxyZuIU=; b=AyQEGaEbFBL7gWFxr0Q2uhbjBJ nrU0OoA/4cASDtngKqwtsZMlS2qTWzybQc/XQ2cEBkIXX9t9ycSaaKOl7JU4OwKnxO0gi5PbxC+pS kMyV3iX6VXkTsbGR+hMcparh2suLBbzp+XXtsR1olS1vUVsCPXbt6tr16nfRniZzDN55GRnNQlEtl DPsdDI0wZ4fNieBNHNVWgCi5sZ/FtecDxJtvA+2edGSv6PnhkT+0+/F01DGrbaPlBz+cvnZomqGa7 IrZQv2C5klB0M3x+73M3dwPqvsIM6bz/9Hn8eVqfd6bn5YUImTP2TbteBMBjboRdbBttUDhwC3QHQ 0oS3DMYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqPS1-0002Le-3q; Tue, 21 Mar 2017 19:28:13 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqPMw-0003aG-MC for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2017 19:23:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1C0331B8A; Tue, 21 Mar 2017 12:22:38 -0700 (PDT) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8652B3F2E5; Tue, 21 Mar 2017 12:22:36 -0700 (PDT) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH v4 26/28] ARM: hyp-stub/KVM: Kill __hyp_get_vectors Date: Tue, 21 Mar 2017 19:20:56 +0000 Message-Id: <20170321192058.9300-27-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170321192058.9300-1-marc.zyngier@arm.com> References: <20170321192058.9300-1-marc.zyngier@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170321_122259_852909_62C82B7F X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Russell King , Ard Biesheuvel , Catalin Marinas , James Morse , Keerthy , Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Nobody is using __hyp_get_vectors anymore, so let's remove both implementations (hyp-stub and KVM). Acked-by: Russell King Signed-off-by: Marc Zyngier --- arch/arm/include/asm/virt.h | 10 ++++------ arch/arm/kernel/hyp-stub.S | 13 +------------ arch/arm/kvm/init.S | 7 +------ arch/arm/kvm/interrupts.S | 4 ---- 4 files changed, 6 insertions(+), 28 deletions(-) diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h index 8d5625b790b5..5f45969d4063 100644 --- a/arch/arm/include/asm/virt.h +++ b/arch/arm/include/asm/virt.h @@ -53,7 +53,6 @@ static inline void sync_boot_mode(void) } void __hyp_set_vectors(unsigned long phys_vector_base); -unsigned long __hyp_get_vectors(void); void __hyp_reset_vectors(void); #else #define __boot_cpu_mode (SVC_MODE) @@ -99,12 +98,11 @@ extern char __hyp_text_end[]; /* Only assembly code should need those */ -#define HVC_GET_VECTORS 0 -#define HVC_SET_VECTORS 1 -#define HVC_SOFT_RESTART 2 -#define HVC_RESET_VECTORS 3 +#define HVC_SET_VECTORS 0 +#define HVC_SOFT_RESTART 1 +#define HVC_RESET_VECTORS 2 -#define HVC_STUB_HCALL_NR 4 +#define HVC_STUB_HCALL_NR 3 #endif /* __ASSEMBLY__ */ diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 3cb01e8a291d..68bf72777ac7 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S @@ -202,12 +202,7 @@ ARM_BE8(orr r7, r7, #(1 << 25)) @ HSCTLR.EE ENDPROC(__hyp_stub_install_secondary) __hyp_stub_do_trap: - teq r0, #HVC_GET_VECTORS - bne 1f - mrc p15, 4, r0, c12, c0, 0 @ get HVBAR - b __hyp_stub_exit - -1: teq r0, #HVC_SET_VECTORS + teq r0, #HVC_SET_VECTORS bne 1f mcr p15, 4, r1, c12, c0, 0 @ set HVBAR b __hyp_stub_exit @@ -247,12 +242,6 @@ ENDPROC(__hyp_stub_do_trap) * so you will need to set that to something sensible at the new hypervisor's * initialisation entry point. */ -ENTRY(__hyp_get_vectors) - mov r0, #HVC_GET_VECTORS - __HVC(0) - ret lr -ENDPROC(__hyp_get_vectors) - ENTRY(__hyp_set_vectors) mov r1, r0 mov r0, #HVC_SET_VECTORS diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index c92e092103b2..3cff15152800 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S @@ -122,12 +122,7 @@ __do_hyp_init: eret ENTRY(__kvm_handle_stub_hvc) - cmp r0, #HVC_GET_VECTORS - bne 1f - mrc p15, 4, r0, c12, c0, 0 @ get HVBAR - b exit - -1: cmp r0, #HVC_SOFT_RESTART + cmp r0, #HVC_SOFT_RESTART bne 1f /* The target is expected in r1 */ diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index b1bd316f14c0..80a1d6cd261c 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S @@ -37,10 +37,6 @@ * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are * passed in r0 (strictly 32bit). * - * A function pointer with a value of 0xffffffff has a special meaning, - * and is used to implement __hyp_get_vectors in the same way as in - * arch/arm/kernel/hyp_stub.S. - * * The calling convention follows the standard AAPCS: * r0 - r3: caller save * r12: caller save