From patchwork Mon Apr 8 20:59:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10890141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 157A31390 for ; Mon, 8 Apr 2019 20:59:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5CBD28518 for ; Mon, 8 Apr 2019 20:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D35312859F; Mon, 8 Apr 2019 20:59:37 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9214028518 for ; Mon, 8 Apr 2019 20:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kvy3Y7zy2hibcBE17mB486cdA5FANEQdgAAV9G/ziVY=; b=CG7yNvvhUBVqFt +JLKmOta4gbFI6cSiKrU8LqJZPs/rAJ0izr01vsCojCDsxwh1OHC8/owl1tvxMcxjGnAr902RWaQh ybuyfHzHEqmoa8G8oDfA71arBEozPh14m3fSvaBfYQiSjGwF1c3IxrkOiqn/yhOpfiUs6pTu+05rv FfSTzgB6TX4ElPRiQn4hdOzOEs/cHL5ktduEpgnE8asCOPpDfxwjntAvMMWjp8Q72RP+h2BsWPudX R6h7mxlRxVeI8aGSMd8Xr7wSRlgr60IXQz8JWiGaoCbrf/djjSr3fNKinTAZDXVvX3HYC3aJsgX53 o3ZKFlQH0vINrCIbbKIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDbMd-0004Ss-K4; Mon, 08 Apr 2019 20:59:35 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDbMC-0003xf-AN for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2019 20:59:11 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3465::360]) by mail.kmu-office.ch (Postfix) with ESMTPSA id B2F6D5C04EE; Mon, 8 Apr 2019 22:59:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1554757145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=3IkGd7fAvSjQ6wSshRo1g6ZJA8Stms8Eb/hB6wtgmtM=; b=QoFuOsQSmj8rzOJ7TmyMFoYfHWPmRTGcFrlH5xRCdWDE9tihkNNxGGFfvX0Q6Zh+Si7vWg 1O++IbaBgnXTDg7sQFe1sb/CWpYZi2Pa4mZn+uqUwmGNl8jCa7uAjKOket0tmhwjgG8n2u SGM6H5C9fWafnwg3rO2P7253fHEGAJw= From: Stefan Agner To: arm@kernel.org Subject: [PATCH v2 1/3] ARM: use arch_extension directive instead of arch argument Date: Mon, 8 Apr 2019 22:59:53 +0200 Message-Id: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190408_135908_735113_86B3E94C X-CRM114-Status: GOOD ( 16.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, andrew@lunn.ch, mans@mansr.com, tony@atomide.com, Stefan Agner , robh@kernel.org, f.fainelli@gmail.com, gregory.clement@bootlin.com, linux@armlinux.org.uk, krzk@kernel.org, kgene@kernel.org, bcm-kernel-feedback-list@broadcom.com, sebastian.hesselbarth@gmail.com, jason@lakedaemon.net, arnd@arndb.de, marc.w.gonzalez@free.fr, rjui@broadcom.com, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, sbranden@broadcom.com, ard.biesheuvel@linaro.org, ndesaulniers@google.com, linux-kernel@vger.kernel.org, robin.murphy@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The LLVM Target parser currently does not allow to specify the security extension as part of -march (see also LLVM Bug 40186 [0]). When trying to use Clang with LLVM's integrated assembler, this leads to build errors such as this: clang-8: error: the clang compiler does not support '-Wa,-march=armv7-a+sec' Use ".arch_extension sec" to enable the security extension in a more portable fasion. Also make sure to use ".arch armv7-a" in case a v6/v7 multi-platform kernel is being built. Note that this is technically not exactly the same as the old code checked for availabilty of the security extension by calling as-instr. However, there are already other sites which use ".arch_extension sec" unconditionally, hence de-facto we need an assembler capable of ".arch_extension sec" already today (arch/arm/mm/proc-v7.S). The arch extension "sec" is available since binutils 2.21 according to its documentation [1]. [0] https://bugs.llvm.org/show_bug.cgi?id=40186 [1] https://sourceware.org/binutils/docs-2.21/as/ARM-Options.html Signed-off-by: Stefan Agner Acked-by: Mans Rullgard Acked-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski --- Changes since v1: - Explicitly specify assembler architecture as armv7-a to avoid build issues when bulding v6/v7 multi arch kernel. arch/arm/mach-bcm/Makefile | 3 --- arch/arm/mach-bcm/bcm_kona_smc.c | 2 -- arch/arm/mach-exynos/Makefile | 4 ---- arch/arm/mach-exynos/exynos-smc.S | 3 ++- arch/arm/mach-exynos/sleep.S | 3 ++- arch/arm/mach-highbank/Makefile | 3 --- arch/arm/mach-highbank/smc.S | 3 ++- arch/arm/mach-keystone/Makefile | 3 --- arch/arm/mach-keystone/smc.S | 1 + arch/arm/mach-omap2/Makefile | 8 -------- arch/arm/mach-omap2/omap-headsmp.S | 2 ++ arch/arm/mach-omap2/omap-smc.S | 3 ++- arch/arm/mach-omap2/sleep33xx.S | 1 + arch/arm/mach-omap2/sleep34xx.S | 2 ++ arch/arm/mach-omap2/sleep43xx.S | 2 ++ arch/arm/mach-omap2/sleep44xx.S | 2 ++ arch/arm/mach-tango/Makefile | 3 --- arch/arm/mach-tango/smc.S | 1 + 18 files changed, 19 insertions(+), 30 deletions(-) diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index 8fd23b263c60..b59c813b1af4 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile @@ -40,9 +40,6 @@ obj-$(CONFIG_ARCH_BCM_MOBILE_L2_CACHE) += kona_l2_cache.o # Support for secure monitor traps obj-$(CONFIG_ARCH_BCM_MOBILE_SMC) += bcm_kona_smc.o -ifeq ($(call as-instr,.arch_extension sec,as_has_sec),as_has_sec) -CFLAGS_bcm_kona_smc.o += -Wa,-march=armv7-a+sec -DREQUIRES_SEC -endif # BCM2835 obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o diff --git a/arch/arm/mach-bcm/bcm_kona_smc.c b/arch/arm/mach-bcm/bcm_kona_smc.c index a55a7ecf146a..541e850a736c 100644 --- a/arch/arm/mach-bcm/bcm_kona_smc.c +++ b/arch/arm/mach-bcm/bcm_kona_smc.c @@ -125,9 +125,7 @@ static int bcm_kona_do_smc(u32 service_id, u32 buffer_phys) __asmeq("%2", "r4") __asmeq("%3", "r5") __asmeq("%4", "r6") -#ifdef REQUIRES_SEC ".arch_extension sec\n" -#endif " smc #0\n" : "=r" (ip), "=r" (r0) : "r" (r4), "r" (r5), "r" (r6) diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index cd00c82a1add..44de9f36fd1b 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -14,9 +14,5 @@ obj-$(CONFIG_PM_SLEEP) += suspend.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o -plus_sec := $(call as-instr,.arch_extension sec,+sec) -AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) -AFLAGS_sleep.o :=-Wa,-march=armv7-a$(plus_sec) - obj-$(CONFIG_EXYNOS5420_MCPM) += mcpm-exynos.o CFLAGS_mcpm-exynos.o += -march=armv7-a diff --git a/arch/arm/mach-exynos/exynos-smc.S b/arch/arm/mach-exynos/exynos-smc.S index d259532ba937..6da31e6a7acb 100644 --- a/arch/arm/mach-exynos/exynos-smc.S +++ b/arch/arm/mach-exynos/exynos-smc.S @@ -10,7 +10,8 @@ /* * Function signature: void exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3) */ - + .arch armv7-a + .arch_extension sec ENTRY(exynos_smc) stmfd sp!, {r4-r11, lr} dsb diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S index 2783c3a0c06a..ed93f91853b8 100644 --- a/arch/arm/mach-exynos/sleep.S +++ b/arch/arm/mach-exynos/sleep.S @@ -44,7 +44,8 @@ ENTRY(exynos_cpu_resume) ENDPROC(exynos_cpu_resume) .align - + .arch armv7-a + .arch_extension sec ENTRY(exynos_cpu_resume_ns) mrc p15, 0, r0, c0, c0, 0 ldr r1, =CPU_MASK diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index 55840f414d3e..e7741b883d13 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile @@ -1,6 +1,3 @@ obj-y := highbank.o system.o smc.o -plus_sec := $(call as-instr,.arch_extension sec,+sec) -AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) - obj-$(CONFIG_PM_SLEEP) += pm.o diff --git a/arch/arm/mach-highbank/smc.S b/arch/arm/mach-highbank/smc.S index 407d17baaaa9..860a79135b7b 100644 --- a/arch/arm/mach-highbank/smc.S +++ b/arch/arm/mach-highbank/smc.S @@ -16,7 +16,8 @@ * the monitor API number. * Function signature : void highbank_smc1(u32 fn, u32 arg) */ - + .arch armv7-a + .arch_extension sec ENTRY(highbank_smc1) stmfd sp!, {r4-r11, lr} mov r12, r0 diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile index f8b0dccac8dc..739b38be5696 100644 --- a/arch/arm/mach-keystone/Makefile +++ b/arch/arm/mach-keystone/Makefile @@ -1,9 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-y := keystone.o smc.o -plus_sec := $(call as-instr,.arch_extension sec,+sec) -AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) - obj-$(CONFIG_SMP) += platsmp.o # PM domain driver for Keystone SOCs diff --git a/arch/arm/mach-keystone/smc.S b/arch/arm/mach-keystone/smc.S index d15de8179fab..ec03dc499270 100644 --- a/arch/arm/mach-keystone/smc.S +++ b/arch/arm/mach-keystone/smc.S @@ -21,6 +21,7 @@ * * Return: Non zero value on failure */ + .arch_extension sec ENTRY(keystone_cpu_smc) stmfd sp!, {r4-r11, lr} smc #0 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 85d1b13c9215..f1d283995b31 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -41,11 +41,6 @@ obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y) sleep44xx.o obj-$(CONFIG_SOC_AM43XX) += $(omap-4-5-common) obj-$(CONFIG_SOC_DRA7XX) += $(omap-4-5-common) $(smp-y) sleep44xx.o -plus_sec := $(call as-instr,.arch_extension sec,+sec) -AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) -AFLAGS_omap-smc.o :=-Wa,-march=armv7-a$(plus_sec) -AFLAGS_sleep44xx.o :=-Wa,-march=armv7-a$(plus_sec) - # Functions loaded to SRAM obj-$(CONFIG_SOC_OMAP2420) += sram242x.o obj-$(CONFIG_SOC_OMAP2430) += sram243x.o @@ -95,9 +90,6 @@ obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o AFLAGS_sleep24xx.o :=-Wa,-march=armv6 -AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) -AFLAGS_sleep33xx.o :=-Wa,-march=armv7-a$(plus_sec) -AFLAGS_sleep43xx.o :=-Wa,-march=armv7-a$(plus_sec) endif diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S index 4c6f14cf92a8..b26c0daaa3c1 100644 --- a/arch/arm/mach-omap2/omap-headsmp.S +++ b/arch/arm/mach-omap2/omap-headsmp.S @@ -58,6 +58,8 @@ ENDPROC(omap5_secondary_startup) * omap5_secondary_startup if the primary CPU was put into HYP mode by * the boot loader. */ + .arch armv7-a + .arch_extension sec ENTRY(omap5_secondary_hyp_startup) wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0 ldr r0, [r2] diff --git a/arch/arm/mach-omap2/omap-smc.S b/arch/arm/mach-omap2/omap-smc.S index 72506e6cf9e7..a14aee5e81d1 100644 --- a/arch/arm/mach-omap2/omap-smc.S +++ b/arch/arm/mach-omap2/omap-smc.S @@ -23,7 +23,8 @@ * link register "lr". * Function signature : void omap_smc1(u32 fn, u32 arg) */ - + .arch armv7-a + .arch_extension sec ENTRY(omap_smc1) stmfd sp!, {r2-r12, lr} mov r12, r0 diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S index 47a816468cdb..68fee339d3f1 100644 --- a/arch/arm/mach-omap2/sleep33xx.S +++ b/arch/arm/mach-omap2/sleep33xx.S @@ -24,6 +24,7 @@ #define BIT(nr) (1 << (nr)) .arm + .arch armv7-a .align 3 ENTRY(am33xx_do_wfi) diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index 22daf4efed68..4927304b5902 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S @@ -97,6 +97,8 @@ ENDPROC(enable_omap3630_toggle_l2_on_restore) * * r0 = physical address of the parameters */ + .arch armv7-a + .arch_extension sec ENTRY(save_secure_ram_context) stmfd sp!, {r4 - r11, lr} @ save registers on stack mov r3, r0 @ physical address of parameters diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S index 5b9343b58fc7..31dda92d9d03 100644 --- a/arch/arm/mach-omap2/sleep43xx.S +++ b/arch/arm/mach-omap2/sleep43xx.S @@ -56,6 +56,8 @@ #define RTC_PMIC_EXT_WAKEUP_EN BIT(0) .arm + .arch armv7-a + .arch_extension sec .align 3 ENTRY(am43xx_do_wfi) diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S index 0cae3b070208..3e6da3bd9dfd 100644 --- a/arch/arm/mach-omap2/sleep44xx.S +++ b/arch/arm/mach-omap2/sleep44xx.S @@ -23,6 +23,8 @@ #if defined(CONFIG_SMP) && defined(CONFIG_PM) + .arch armv7-a + .arch_extension sec .macro DO_SMC dsb smc #0 diff --git a/arch/arm/mach-tango/Makefile b/arch/arm/mach-tango/Makefile index da6c633d3cc0..97cd04508fa1 100644 --- a/arch/arm/mach-tango/Makefile +++ b/arch/arm/mach-tango/Makefile @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -plus_sec := $(call as-instr,.arch_extension sec,+sec) -AFLAGS_smc.o := -Wa,-march=armv7-a$(plus_sec) - obj-y += setup.o smc.o obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_SUSPEND) += pm.o diff --git a/arch/arm/mach-tango/smc.S b/arch/arm/mach-tango/smc.S index 361a8dc89804..cf2d21e5226c 100644 --- a/arch/arm/mach-tango/smc.S +++ b/arch/arm/mach-tango/smc.S @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include + .arch_extension sec ENTRY(tango_smc) push {lr} mov ip, r1 From patchwork Mon Apr 8 20:59:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10890137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0866B17EF for ; Mon, 8 Apr 2019 20:59:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFE172875C for ; Mon, 8 Apr 2019 20:59:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D199C287E8; Mon, 8 Apr 2019 20:59:17 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8352B2875C for ; Mon, 8 Apr 2019 20:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WtEhJNwINiud3ZzC8jPS71RVO5XPyi8PGz5X9g6CyAM=; b=ZyqwUr/T6R67TI pH2qMeMsN+MwMUwkfMuGBuCJRPC/TMTor98etiQKytRIjK1kTL75UfET8eGRUTZDk5JuebrrbfK0d NhdzOqJ7OTcGMV3s3qDa4OE9YnA2gZi6TSnLpegdT4McLtEakCqPKU6remlc4Hohs3tPExGO4mm9a YZ+4adp1z82uyZLGLLu0X88fSPtoYYNxbwQDUt5CG6S/drfgAmFUnuBNEzbT5jO70VUH88trsn435 D1GFjXlgaIVRe0ivjeML6aQRx8uq0QkX2w9BgNEO7v4bwyFRZBZqKlTq1iF60yq0nWuhu4RUXAXYa xfTXYvB+WZO83Fh71woQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDbMF-0003yW-FG; Mon, 08 Apr 2019 20:59:11 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDbMC-0003xg-AQ for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2019 20:59:09 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3465::360]) by mail.kmu-office.ch (Postfix) with ESMTPSA id D266B5C2195; Mon, 8 Apr 2019 22:59:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1554757145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vD7C3SpFDMxg92USPDGMEInDsi77a4O2+ZRx+UKL2OY=; b=b+oDcw0XVlNWr4gdAT5VL9uT9F7E6JInk5ReVmLNk1tcRoPUK/ZdNH2HfCljz+QF6ifqBZ XgvalTE3qa6Zzrp0gxrgWKbunZ+1f+/aPPehY/1pBKBdyi8CaZZtlTwd4KP2ycM7DnIqWP 8mmft8kBvvIzmA9wiqBESa+OiWuQGjQ= From: Stefan Agner To: arm@kernel.org Subject: [PATCH v2 2/3] ARM: mvebu: drop unnecessary label Date: Mon, 8 Apr 2019 22:59:54 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> References: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190408_135908_517315_F2EE1C11 X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, andrew@lunn.ch, mans@mansr.com, tony@atomide.com, Stefan Agner , robh@kernel.org, f.fainelli@gmail.com, gregory.clement@bootlin.com, linux@armlinux.org.uk, krzk@kernel.org, kgene@kernel.org, bcm-kernel-feedback-list@broadcom.com, sebastian.hesselbarth@gmail.com, jason@lakedaemon.net, arnd@arndb.de, marc.w.gonzalez@free.fr, rjui@broadcom.com, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, sbranden@broadcom.com, ard.biesheuvel@linaro.org, Nicolas Pitre , ndesaulniers@google.com, linux-kernel@vger.kernel.org, robin.murphy@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The label mvebu_boot_wa_start is not necessary and causes a build issue when building with LLVM's integrated assembler: AS arch/arm/mach-mvebu/pmsu_ll.o arch/arm/mach-mvebu/pmsu_ll.S:59:1: error: invalid symbol redefinition mvebu_boot_wa_start: ^ Drop the label. Signed-off-by: Stefan Agner Acked-by: Nicolas Pitre --- arch/arm/mach-mvebu/pmsu_ll.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S index 88651221dbdd..c1fb713e9306 100644 --- a/arch/arm/mach-mvebu/pmsu_ll.S +++ b/arch/arm/mach-mvebu/pmsu_ll.S @@ -56,7 +56,6 @@ ENDPROC(armada_38x_cpu_resume) /* The following code will be executed from SRAM */ ENTRY(mvebu_boot_wa_start) -mvebu_boot_wa_start: ARM_BE8(setend be) adr r0, 1f ldr r0, [r0] @ load the address of the From patchwork Mon Apr 8 20:59:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10890139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B7461390 for ; Mon, 8 Apr 2019 20:59:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 303E12875C for ; Mon, 8 Apr 2019 20:59:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2310D287E8; Mon, 8 Apr 2019 20:59:22 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ADAE52875C for ; Mon, 8 Apr 2019 20:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tNRbkQ6sx54qnEjLc5inUuJEC2sIDOiS04rz4y/bzhk=; b=RGYu3646cRDlNY PuNHCC6D/nBNYSVzsaC2u2sGq45zUmN4s8X9hAqfyIFBHYiPZMD9gY5ygL+B8IWeCdMfg1tKr7vaa h2h6uohdQNdtfazjrt0OyKs6HxGObUM9DecBPNlncxKbtOQZafYRVGFsMwWJ2U4q/Q9kJ+1fP7fkm kbPPty0LoL3SpvEQgg6/XjBASYUqgpWQzqRM0boEvPdsl7sOhaBNL5jFnleXtPpV3c7WE3p9l0IB7 IzDgEVVMnxHeE19rzid160tN0Affrksbab4GPaG2zl6hMYFs3SIny0Zf+fcYe2zWZo9JQJUvEsGws Jt1uiaWcK6Km0RXPPw9A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDbMM-00046Y-Kb; Mon, 08 Apr 2019 20:59:18 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDbMC-0003xh-AP for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2019 20:59:09 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3465::360]) by mail.kmu-office.ch (Postfix) with ESMTPSA id F30575C2196; Mon, 8 Apr 2019 22:59:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1554757146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mE+cgShggDTO6VFE2wiOyVFnlAoIaj8WJeqFxe4soyI=; b=BCAZVeWa1mumPCOFv9cVhuD6Al6kfVTKsPDwcYrH6KYhU/AkhUFUIbcXIFfBY+xVkpfBUQ Bv13fzLQcpNL+sR2HdW3jljur4ekgAsC3R2G4s7sIRZfqZhVRTGsExefA8l8nJm6GPyZbl EsXvRQdgcMGdKo41p77QkCAaPpzVk5I= From: Stefan Agner To: arm@kernel.org Subject: [PATCH v2 3/3] ARM: mvebu: prefix coprocessor operand with p Date: Mon, 8 Apr 2019 22:59:55 +0200 Message-Id: <09e394aa9368227a45144f169a680747a454c95b.1554757135.git.stefan@agner.ch> X-Mailer: git-send-email 2.21.0 In-Reply-To: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> References: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190408_135908_515486_735F6454 X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, andrew@lunn.ch, mans@mansr.com, tony@atomide.com, Stefan Agner , robh@kernel.org, f.fainelli@gmail.com, gregory.clement@bootlin.com, linux@armlinux.org.uk, krzk@kernel.org, kgene@kernel.org, bcm-kernel-feedback-list@broadcom.com, sebastian.hesselbarth@gmail.com, jason@lakedaemon.net, arnd@arndb.de, marc.w.gonzalez@free.fr, rjui@broadcom.com, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, sbranden@broadcom.com, ard.biesheuvel@linaro.org, Nicolas Pitre , ndesaulniers@google.com, linux-kernel@vger.kernel.org, robin.murphy@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In every other instance where mrc is used the coprocessor operand is prefix with p (e.g. p15). Use the p prefix in this case too. This fixes a build issue when using LLVM's integrated assembler: arch/arm/mach-mvebu/coherency_ll.S:69:6: error: invalid operand for instruction mrc 15, 0, r3, cr0, cr0, 5 ^ arch/arm/mach-mvebu/pmsu_ll.S:19:6: error: invalid operand for instruction mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID ^ Signed-off-by: Stefan Agner Acked-by: Nicolas Pitre --- arch/arm/mach-mvebu/coherency_ll.S | 2 +- arch/arm/mach-mvebu/pmsu_ll.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S index 8b2fbc8b6bc6..2d962fe48821 100644 --- a/arch/arm/mach-mvebu/coherency_ll.S +++ b/arch/arm/mach-mvebu/coherency_ll.S @@ -66,7 +66,7 @@ ENDPROC(ll_get_coherency_base) * fabric registers */ ENTRY(ll_get_coherency_cpumask) - mrc 15, 0, r3, cr0, cr0, 5 + mrc p15, 0, r3, cr0, cr0, 5 and r3, r3, #15 mov r2, #(1 << 24) lsl r3, r2, r3 diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S index c1fb713e9306..7aae9a25cfeb 100644 --- a/arch/arm/mach-mvebu/pmsu_ll.S +++ b/arch/arm/mach-mvebu/pmsu_ll.S @@ -16,7 +16,7 @@ ENTRY(armada_38x_scu_power_up) mrc p15, 4, r1, c15, c0 @ get SCU base address orr r1, r1, #0x8 @ SCU CPU Power Status Register - mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID + mrc p15, 0, r0, cr0, cr0, 5 @ get the CPU ID and r0, r0, #15 add r1, r1, r0 mov r0, #0x0