From patchwork Mon Apr 3 18:37:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9660075 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 98C9860352 for ; Mon, 3 Apr 2017 18:39:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A5B9284F3 for ; Mon, 3 Apr 2017 18:39:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F49B284F5; Mon, 3 Apr 2017 18:39:09 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 30E59284F8 for ; Mon, 3 Apr 2017 18:39:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754198AbdDCSjE (ORCPT ); Mon, 3 Apr 2017 14:39:04 -0400 Received: from foss.arm.com ([217.140.101.70]:34822 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073AbdDCSjB (ORCPT ); Mon, 3 Apr 2017 14:39:01 -0400 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 1340919BF; Mon, 3 Apr 2017 11:39:01 -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 792EB3F3E1; Mon, 3 Apr 2017 11:38:59 -0700 (PDT) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Russell King , Christoffer Dall , Mark Rutland , Catalin Marinas , James Morse , Ard Biesheuvel , Keerthy Subject: [PATCH v5 16/34] ARM: hyp-stub: Use r1 for the soft-restart address Date: Mon, 3 Apr 2017 19:37:49 +0100 Message-Id: <20170403183807.1620-17-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170403183807.1620-1-marc.zyngier@arm.com> References: <20170403183807.1620-1-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is not really obvious why the restart address should be in r3 when communicated to the hyp-stub. r1 should be perfectly adequate, and consistent with the rest of the code. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier --- arch/arm/kernel/hyp-stub.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 8301db963d83..15eaa14322a7 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S @@ -214,7 +214,7 @@ __hyp_stub_do_trap: 1: teq r0, #HVC_SOFT_RESTART bne 1f - bx r3 + bx r1 1: mov r0, #-1 @@ -258,10 +258,9 @@ ENTRY(__hyp_set_vectors) ENDPROC(__hyp_set_vectors) ENTRY(__hyp_soft_restart) - mov r3, r0 + mov r1, r0 mov r0, #HVC_SOFT_RESTART __HVC(0) - mov r0, r3 ret lr ENDPROC(__hyp_soft_restart)