From patchwork Sun Apr 23 17:09:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695053 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 20B3360245 for ; Sun, 23 Apr 2017 17:13:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BA9D26530 for ; Sun, 23 Apr 2017 17:13:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 008DF265B9; Sun, 23 Apr 2017 17:13:45 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60B1A26530 for ; Sun, 23 Apr 2017 17:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162645AbdDWRNm (ORCPT ); Sun, 23 Apr 2017 13:13:42 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35195 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162419AbdDWRKm (ORCPT ); Sun, 23 Apr 2017 13:10:42 -0400 Received: by mail-wm0-f54.google.com with SMTP id w64so46380611wma.0 for ; Sun, 23 Apr 2017 10:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0YHCCXfFAH++cygyeywsFQUSzTlA1jE6/8xOQUQRrxM=; b=XgDWvjAIDTnilRhK7fAEEXYvRfy6Px1a017TI9LQ0scsIXnwGfm64yPAvPJGLH9Xlv aGOvAHF/+80JLYDnKmF7y/PhxQDI/jBhhH2LW+4XK9PIP6iq4+ANoVN+tx0CLn5GcLyd ClNpsOyXzANv6pem+6KjioSrD7YnRWQpepLGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0YHCCXfFAH++cygyeywsFQUSzTlA1jE6/8xOQUQRrxM=; b=G/fQzg5TmcxoMhtrq4W0kx4xuw5sjzxw9xNAgpxDO4wu7WeEFQ9AajOq8LLru+I7K0 obftpy2RpY1xzB6YXHO/A6TUcpBTDkZ9H7awfseT4N95KASQKri1wu0uzQJIinKlWrte R+guurZh9GMsQyJVPApYwrBet8mCNHAQKuShTihN/fLpDyFS8b7u4hWiE/1U+88O7vbd 7ot5stKyNJTRhaFkjl6BGJWBJ64wEpaprFcYSAAONQ3Nmp2nBvpbroC5qotaZvjKxUzK t20+KbDRo5YzSCMbnYdz1UzT27FDgd38mbe9Sr4/ecRNsf8j2v9gatD+vwCCCUdeD+k+ MWQQ== X-Gm-Message-State: AN3rC/5pJd65q2akOf1XlNllE97Z6WzU1NyPB/sXTjCdpLHJKI/p//92 Eh41JQM+Vs559Lxr X-Received: by 10.80.183.100 with SMTP id g91mr141723ede.86.1492967441015; Sun, 23 Apr 2017 10:10:41 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.10.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:40 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall Subject: [PULL 65/79] ARM: hyp-stub/KVM: Kill __hyp_get_vectors Date: Sun, 23 Apr 2017 19:09:15 +0200 Message-Id: <20170423170929.27334-66-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier Nobody is using __hyp_get_vectors anymore, so let's remove both implementations (hyp-stub and KVM). Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- 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 663adc0..141144f 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 675c50f..918c64f 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 e53360d..87bcd7a 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 b1bd316..80a1d6c 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