From patchwork Fri Nov 7 14:12:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 40409 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D1B6724237 for ; Fri, 7 Nov 2014 14:17:57 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id r20sf1950902wiv.10 for ; Fri, 07 Nov 2014 06:17:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=bqURuRI7mFtiteqW5sPwkrWDubq+tOZQn3hAD2YDKDw=; b=Qu0vHXD2h64c3Ce27DJINcEbcvfEWsBDoKl/a6jR/oKoBnEu5rElEMiuiBh5GPSEZF DLF6N5hnW2Aw+1AvduiomRvxVh6Dy/ZR8rBV2A2Pl0z8/+JCyXgpScL4XZYGXNi3Q1TK N949Ibbdhbxi53fjXuQQppgbel2yHrbqX2KtCe8PgtuYDNMf4LSbwOh6HNmfM7uvXdYw +pd3/TvcaOlvHDnGHHeZfS16VR5WL6K595PfuohIqNOJeqPyF2ULcFYxqsPzDmcCM8Vy kch7ohvC/U0Cy/wRKiq5sYuKNsJYBcYNFA/wbnMnzpBQBwTouDNHgpOC2XuqRh9bcas/ gEcw== X-Gm-Message-State: ALoCoQk+6cesWl6ygsvn4iPh2cQ7nBW6nH+0eCr0ddqOGpXIWsGGR7wWMmZWih+bO8MfcvbTzJ5e X-Received: by 10.112.159.199 with SMTP id xe7mr73038lbb.21.1415369877111; Fri, 07 Nov 2014 06:17:57 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.5 with SMTP id w5ls219211law.71.gmail; Fri, 07 Nov 2014 06:17:56 -0800 (PST) X-Received: by 10.152.1.130 with SMTP id 2mr2645997lam.89.1415369876897; Fri, 07 Nov 2014 06:17:56 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id wh3si15130063lbb.118.2014.11.07.06.17.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 06:17:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id f15so3057608lbj.9 for ; Fri, 07 Nov 2014 06:17:56 -0800 (PST) X-Received: by 10.152.42.226 with SMTP id r2mr11479925lal.29.1415369876791; Fri, 07 Nov 2014 06:17:56 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp204049lbc; Fri, 7 Nov 2014 06:17:55 -0800 (PST) X-Received: by 10.68.65.68 with SMTP id v4mr12292170pbs.52.1415369875229; Fri, 07 Nov 2014 06:17:55 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id gc7si9220750pac.58.2014.11.07.06.17.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Nov 2014 06:17:55 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XmkKg-0004OP-GD; Fri, 07 Nov 2014 14:16:10 +0000 Received: from mail-wi0-f181.google.com ([209.85.212.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XmkHZ-0008WR-Ef for linux-arm-kernel@lists.infradead.org; Fri, 07 Nov 2014 14:12:58 +0000 Received: by mail-wi0-f181.google.com with SMTP id n3so4697253wiv.8 for ; Fri, 07 Nov 2014 06:12:32 -0800 (PST) X-Received: by 10.195.13.161 with SMTP id ez1mr14203029wjd.126.1415369552405; Fri, 07 Nov 2014 06:12:32 -0800 (PST) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id kn5sm4399444wjb.48.2014.11.07.06.12.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 06:12:31 -0800 (PST) From: Ard Biesheuvel To: will.deacon@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com Subject: [PATCH 2/2] arm64: kvm: eliminate literal pool entries Date: Fri, 7 Nov 2014 15:12:34 +0100 Message-Id: <1415369554-7444-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1415369554-7444-1-git-send-email-ard.biesheuvel@linaro.org> References: <1415369554-7444-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141107_061257_705014_11F0F169 X-CRM114-Status: UNSURE ( 8.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.181 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: marc.zyngier@arm.com, christoffer.dall@linaro.org, Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Replace two instances of 'ldr xN, =(constant)' in the world switch hot path with 'mov' instructions. Signed-off-by: Ard Biesheuvel Acked-by: Marc Zyngier Acked-by: Christoffer Dall --- arch/arm64/kvm/hyp.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index b72aa9f9215c..fbe909fb0a1a 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -761,10 +761,10 @@ .macro activate_traps ldr x2, [x0, #VCPU_HCR_EL2] msr hcr_el2, x2 - ldr x2, =(CPTR_EL2_TTA) + mov x2, #CPTR_EL2_TTA msr cptr_el2, x2 - ldr x2, =(1 << 15) // Trap CP15 Cr=15 + mov x2, #(1 << 15) // Trap CP15 Cr=15 msr hstr_el2, x2 mrs x2, mdcr_el2