From patchwork Sat Aug 5 20:52:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 109502 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp992293qge; Sat, 5 Aug 2017 13:54:20 -0700 (PDT) X-Received: by 10.84.236.70 with SMTP id h6mr8143416pln.339.1501966460871; Sat, 05 Aug 2017 13:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501966460; cv=none; d=google.com; s=arc-20160816; b=ncvIlhYJaDEANKQ+ZTp0tGrzUQWWR/4aXllW4a9LSKgAMAVbtldQpgJP+3aPA1OBcF a+OH2Mfs7KPwPPKOGFxH1Rpe0LfEd6egJPPEYBiqFd3Hmyvz7eXP9i0YQ6Ly9t+lFMkg 3kQzQp58B/A6PelmW+K+7lq61DI1HC7bkFZ2vfmnlmCpNP6Z+OukCiFz/E8RXRGVRmYz p67Al87NNXiTttPKHaaT2nE04QK/9WIKl9vTmqd9RRavkcJUj90ynt/W4acdT12avSNT itedo9qeqDymAnZF+6JjUM7k2rOBywr3ffklZHaaHndUv7J7j3fAZbXtfPPv1J/ouPe2 undw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bB/xSs/7/TMX77s4pTV/jO7RiPXYB4iGimQehgDLePk=; b=n8arrIQoEb/XOGld2Jf3HpEOgiTm3gEqqo0fU8370clgkDS0noSS29PkAThDvotro+ 7IsKHukB9Hk2XHiKd2JKEQ6jmzq2B0eekICu49R8qTJqGxwmxJFxlM+PlyBkaec28BLL R9d86XU7Kre5CRfNWRlzV2T8em3NtcFCDc8PQ1tFLVI/sK6VwiEVurlH8Wr5eBfcjWY3 USsyAqYKYMy2SxuhQ1Ni645XrnnSDGX8bc/oeBEMTgOvE/+Ntbn4C+hf+X9saTl66MfL CdzT6WXhK00lVGSmOZbM9sm2RxqPCRXY10CLg/VAzOa3RSmSTgfTc+fPI66Hpi38Dhm0 l1JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Vgtp4UZb; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si2667268pfg.662.2017.08.05.13.54.20; Sat, 05 Aug 2017 13:54:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Vgtp4UZb; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbdHEUyR (ORCPT + 3 others); Sat, 5 Aug 2017 16:54:17 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37366 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752795AbdHEUxm (ORCPT ); Sat, 5 Aug 2017 16:53:42 -0400 Received: by mail-wm0-f48.google.com with SMTP id t201so42547383wmt.0 for ; Sat, 05 Aug 2017 13:53:42 -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=8t6IV4bmNjAgcv5Be09tvxPF5UJpUqInMAYOh79BmGQ=; b=Vgtp4UZbkswXzgx2tTKUNNUmWB50/LXHnuSHBwwIUGaJ/gZSEkWQxGgm5Ilz6SUXre 6/uM+owxdBIUrQQxSnyVpongquNfhMLQ9u3a6mALIGDyEv5rF18PIJjLIhPfDkkOMS3o T8eaFGbFPqbE6nwwiwmXhVgETne25gHGMIiyw= 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=8t6IV4bmNjAgcv5Be09tvxPF5UJpUqInMAYOh79BmGQ=; b=Jk7TSHQ78C1KOT6pduvAS4VF33ZPKokwJ9rcEXBP1Y97dYdNYUdQcEcvT23vWbOQUD jXsLDv0phs8TqOaffhYkNGqy1HbqmCjVbynGoDGiVUNl2tE66ITx/HampySuXW35E79k VWGZfUn8klit6mgTisCUH8bwGB8h5aXn5Bov9uuyneX6WXRVX8G+Q7Y3dRPj3I/O6DX6 +1k46dnlBGV+/K7EvbdLp2hRzmDbUMCW+ipBQOnLBDp6EN3KbEzTUDMXrUIrIhK4mhyQ oVrcPxojaN/2fkitInjjYMZxKwm5+YdK2Z0RZpHv7AC3t/whRvsjazNf5ih/XQaB1n6X VH4g== X-Gm-Message-State: AHYfb5ghvxYajPxcxXGAJpdUiltzjXrPf2NsxlNH8w+lbhEJcqd9wW2h n5r10NYcpG8MReVx X-Received: by 10.28.71.206 with SMTP id m75mr4292742wmi.13.1501966421464; Sat, 05 Aug 2017 13:53:41 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:40 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux@armlinux.org.uk, linux-omap@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, krzk@kernel.org, jason@lakedaemon.net, arm@kernel.org, andrew@lunn.ch, gregory.clement@free-electrons.com, sebastian.hesselbarth@gmail.com, tony@atomide.com, baohua@kernel.org, horms@verge.net.au, magnus.damm@gmail.com, vireshk@kernel.org, shiraz.linux.kernel@gmail.com, patrice.chotard@st.com, nico@linaro.org, dave.martin@arm.com, marc.zyngier@arm.com Cc: Ard Biesheuvel Subject: [PATCH 10/15] arm-soc: exynos: replace open coded VA->PA conversions Date: Sat, 5 Aug 2017 21:52:17 +0100 Message-Id: <20170805205222.19868-11-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170805205222.19868-1-ard.biesheuvel@linaro.org> References: <20170805205222.19868-1-ard.biesheuvel@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This replaces a couple of open coded calculations to obtain the physical address of a far symbol with calls to the new adr_l etc macros. Signed-off-by: Ard Biesheuvel --- arch/arm/mach-exynos/headsmp.S | 9 +------ arch/arm/mach-exynos/sleep.S | 26 ++++---------------- 2 files changed, 6 insertions(+), 29 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S index d3d24ab351ae..25de5aff1c41 100644 --- a/arch/arm/mach-exynos/headsmp.S +++ b/arch/arm/mach-exynos/headsmp.S @@ -23,10 +23,7 @@ ENTRY(exynos4_secondary_startup) ARM_BE8(setend be) mrc p15, 0, r0, c0, c0, 5 and r0, r0, #15 - adr r4, 1f - ldmia r4, {r5, r6} - sub r4, r4, r5 - add r6, r6, r4 + adr_l r6, pen_release pen: ldr r7, [r6] cmp r7, r0 bne pen @@ -37,7 +34,3 @@ pen: ldr r7, [r6] */ b secondary_startup ENDPROC(exynos4_secondary_startup) - - .align 2 -1: .long . - .long pen_release diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S index cf950790fbdc..003465699263 100644 --- a/arch/arm/mach-exynos/sleep.S +++ b/arch/arm/mach-exynos/sleep.S @@ -17,6 +17,7 @@ #include #include +#include #include #include "smc.h" @@ -62,19 +63,13 @@ ENTRY(exynos_cpu_resume_ns) cmp r0, r1 bne skip_cp15 - adr r0, _cp15_save_power - ldr r1, [r0] - ldr r1, [r0, r1] - adr r0, _cp15_save_diag - ldr r2, [r0] - ldr r2, [r0, r2] + ldr_l r1, cp15_save_power + ldr_l r2, cp15_save_diag mov r0, #SMC_CMD_C15RESUME dsb smc #0 #ifdef CONFIG_CACHE_L2X0 - adr r0, 1f - ldr r2, [r0] - add r0, r2, r0 + adr_l r0, l2x0_saved_regs /* Check that the address has been initialised. */ ldr r1, [r0, #L2X0_R_PHY_BASE] @@ -93,9 +88,7 @@ ENTRY(exynos_cpu_resume_ns) smc #0 /* Reload saved regs pointer because smc corrupts registers. */ - adr r0, 1f - ldr r2, [r0] - add r0, r2, r0 + adr_l r0, l2x0_saved_regs ldr r1, [r0, #L2X0_R_PWR_CTRL] ldr r2, [r0, #L2X0_R_AUX_CTRL] @@ -114,15 +107,6 @@ skip_cp15: b cpu_resume ENDPROC(exynos_cpu_resume_ns) - .align -_cp15_save_power: - .long cp15_save_power - . -_cp15_save_diag: - .long cp15_save_diag - . -#ifdef CONFIG_CACHE_L2X0 -1: .long l2x0_saved_regs - . -#endif /* CONFIG_CACHE_L2X0 */ - .data .globl cp15_save_diag cp15_save_diag: