From patchwork Sat Aug 5 20:52:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9883379 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 DD4D1603FB for ; Sat, 5 Aug 2017 20:54:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFEF6287BE for ; Sat, 5 Aug 2017 20:54:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C461E287BD; Sat, 5 Aug 2017 20:54:52 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 6AA3F28807 for ; Sat, 5 Aug 2017 20:54:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752734AbdHEUyE (ORCPT ); Sat, 5 Aug 2017 16:54:04 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:38579 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbdHEUx4 (ORCPT ); Sat, 5 Aug 2017 16:53:56 -0400 Received: by mail-wm0-f49.google.com with SMTP id m85so42574140wma.1 for ; Sat, 05 Aug 2017 13:53:56 -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=HgtvlHtjxVQtYXstO0AYX5efYHzWsBFgWdEFzZ6J5m8=; b=MiX1R5+g9uw7R63eTtwF0t1sTWTfaQw7RpJHNyBCFaoUyJ+BkM52E1Au3Tz1XVza5s WyStk+mg8aJa9Na7yiljVgDo4zyVkv/tLUFVAqmSDLk8/srbSCaW1+h61hjhWI/4egci PF2BmCevVmzd+R53Uky3ium2sNqstliCzqTOs= 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=HgtvlHtjxVQtYXstO0AYX5efYHzWsBFgWdEFzZ6J5m8=; b=aSLWTSPK7V27nsw5xsPRuSfLJy3MPkC+HlSKSnm9AMcEJG8SXbEOpqtyEymSowcWRR /W0/syCPsVy3MRwQn8ODWKlOUtOx/SSSR5nWnRpCPMHrObwq0wkBvlUCX51FQ3nIQ8Rb iBcB0gXAnTCBE6rSBR2iaaKeW5/bWGNE2L9mF4SpFPu6c2MlE6pyVcGQ7jpUsME+m2qT IubML+nFd79sF+WWuPZ42P6NGX6fhRWHjFOinfzZvxHc/DpO/zlNZKYLVj5nyM3HQZfn KtANNuhDHnMPpB2JA5bwX76q5Oc92LCUv1tjWtE1fyyuLIY+F0V+tISyisyh9v2HM5yg 27dA== X-Gm-Message-State: AHYfb5gGuPZm2B20i2dRmumUq5TPx6cXJGhfs0PVE/EYNW9bUOhVjuu6 WWn1Mkk/6p06JhZv X-Received: by 10.28.181.18 with SMTP id e18mr4287563wmf.157.1501966435763; Sat, 05 Aug 2017 13:53:55 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:54 -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 14/15] arm-soc: shmobile: replace open coded VA->PA calculation Date: Sat, 5 Aug 2017 21:52:21 +0100 Message-Id: <20170805205222.19868-15-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: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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-shmobile/headsmp.S | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index 32e0bf6e3ccb..f5e0d7c93cda 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S @@ -46,11 +46,10 @@ ENTRY(shmobile_smp_boot) and r0, r1, #0xffffff @ MPIDR_HWID_BITMASK @ r0 = cpu_logical_map() value mov r1, #0 @ r1 = CPU index - adr r2, 1f - ldmia r2, {r5, r6, r7} - add r5, r5, r2 @ array of per-cpu mpidr values - add r6, r6, r2 @ array of per-cpu functions - add r7, r7, r2 @ array of per-cpu arguments + + adr_l r5, shmobile_smp_mpidr @ array of per-cpu mpidr values + adr_l r6, shmobile_smp_fn @ array of per-cpu functions + adr_l r7, shmobile_smp_arg @ array of per-cpu arguments shmobile_smp_boot_find_mpidr: ldr r8, [r5, r1, lsl #2] @@ -78,11 +77,6 @@ ENTRY(shmobile_smp_sleep) b shmobile_smp_boot ENDPROC(shmobile_smp_sleep) - .align 2 -1: .long shmobile_smp_mpidr - . - .long shmobile_smp_fn - 1b - .long shmobile_smp_arg - 1b - .bss .globl shmobile_smp_mpidr shmobile_smp_mpidr: