From patchwork Thu Jan 31 12:15:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 2073431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 1A13C3FD1A for ; Thu, 31 Jan 2013 12:38:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0tNn-0003az-FD; Thu, 31 Jan 2013 12:36:47 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0t5d-0006B7-7H for linux-arm-kernel@lists.infradead.org; Thu, 31 Jan 2013 12:18:02 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 31 Jan 2013 12:17:57 +0000 Received: from e106331-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 31 Jan 2013 12:17:56 +0000 From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv5 15/16] ARM: hyp: initialize CNTVOFF to zero Date: Thu, 31 Jan 2013 12:15:38 +0000 Message-Id: <1359634539-9580-16-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1359634539-9580-1-git-send-email-mark.rutland@arm.com> References: <1359634539-9580-1-git-send-email-mark.rutland@arm.com> X-OriginalArrivalTime: 31 Jan 2013 12:17:56.0104 (UTC) FILETIME=[002DD080:01CDFFAD] X-MC-Unique: 113013112175700301 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130131_071801_615664_8E5B0A3C X-CRM114-Status: UNSURE ( 7.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [91.220.42.44 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: mark.rutland@arm.com, c.dall@virtualopensystems.com, swarren@nvidia.com, Marc Zyngier , catalin.marinas@arm.com, sboyd@codeaurora.org, will.deacon@arm.com, santosh.shilimkar@ti.com, thomas.abraham@linaro.org, Dave Martin X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Marc Zyngier In order to be able to use the virtual counter in a safe way, make sure it is initialized to zero before dropping to SVC. Signed-off-by: Marc Zyngier Signed-off-by: Mark Rutland Cc: Dave Martin Reviewed-by: Dave Martin --- arch/arm/kernel/hyp-stub.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 65b2417..455603a 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S @@ -152,6 +152,9 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL orr r7, r7, #3 @ PL1PCEN | PL1PCTEN mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL + mov r6, #0 + mov r7, #0 + mcrr p15, 4, r6, r7, c14 @ CNTVOFF 1: #endif