Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1672998img; Sat, 23 Mar 2019 09:04:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxY9Qkx88Fy8NLHX93HdDoWOsBFzCf4vwUhIrkKLxxpr8bbWoXJ6H/qasBD3i7ou2EF7eJa X-Received: by 2002:a65:6289:: with SMTP id f9mr1495952pgv.380.1553357051588; Sat, 23 Mar 2019 09:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553357051; cv=none; d=google.com; s=arc-20160816; b=0vNJ5G7W/lWcaakLScOY39+TNvss1g2UFqnMraApdiKq6SLqcjaUd91qZJVPHxbRgf tMB33X0vOk3fBXGA85gcHG4XNSNa4ARjDSm6bwLsVLFLWJ7VSBfz/E5vR0QH+JQRlxO8 Nvc6DXre/Yuqc5iN/Ye0Y0Xc8oSs0awoKwAclnKRCPAEBILgWzJcYF1kViJhxq8/ENNl jsyTbo0axkBtAGdmv9wkrkEktZ7p+E6c1S7BvLsCFM1v1cCxcy1sxHLULkeks2YKEqHD 1Sdcp2662j/UNcZJ2aiLfc+bmUcJL26ORfrjRlQsZsuoOopac+lik28nUy/Zt69XTRYD /Svw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=WS2qt0LAB1fttZYi7OoqjUKtjOHiF5z/4+vRierli54=; b=zLCOb/w+ivYoVDUZZ84+3U5/0LBujvXdEe7qguOE1bwu0+9mSs67gQR/cxJ8lZNBGL /fBcb6horfc6cnqVO8JRTUxgojfhe6t0cZJq5ufmkSJ+Ojib6v4GTPp+0w8inGxBDG2q 1nUPGIzMvVwUQrXC96maVMN62byhRk+tSPEm8ciO9PC4THn8nATeEJFWgiclCLTDYa8p sP7pnXMBOX+JfsGaFy2yjTGHX2K5pKkBlp16Z6mqoyTWLPpurveAOdtWALjTH6o3qPFq 0e32tfXBsj9Q+Y3yFmOP3qH5dcUYOjdUvgRSICg06FoP1gy2xYGyIZaTdUQAtksqdsSf w4sQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si9026597pgp.165.2019.03.23.09.03.53; Sat, 23 Mar 2019 09:04:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727680AbfCWQC7 convert rfc822-to-8bit (ORCPT + 99 others); Sat, 23 Mar 2019 12:02:59 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:41680 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbfCWQC6 (ORCPT ); Sat, 23 Mar 2019 12:02:58 -0400 Received: by unicorn.mansr.com (Postfix, from userid 51770) id EDF2114CEA; Sat, 23 Mar 2019 16:02:49 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Stefan Agner Cc: linux@armlinux.org.uk, arnd@arndb.de, ard.biesheuvel@linaro.org, robin.murphy@arm.com, nicolas.pitre@linaro.org, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, kgene@kernel.org, krzk@kernel.org, robh@kernel.org, ssantosh@kernel.org, jason@lakedaemon.net, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, tony@atomide.com, marc.w.gonzalez@free.fr, ndesaulniers@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] ARM: use arch_extension directive instead of arch argument References: <9641c58c03720104186a797a96e30a52ae9805e4.1553356359.git.stefan@agner.ch> Date: Sat, 23 Mar 2019 16:02:49 +0000 In-Reply-To: <9641c58c03720104186a797a96e30a52ae9805e4.1553356359.git.stefan@agner.ch> (Stefan Agner's message of "Sat, 23 Mar 2019 16:52:56 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stefan Agner writes: > 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 a 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. > > 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 > --- > 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 | 2 +- > arch/arm/mach-exynos/sleep.S | 2 +- > arch/arm/mach-highbank/Makefile | 3 --- > arch/arm/mach-highbank/smc.S | 2 +- > 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 | 1 + > arch/arm/mach-omap2/omap-smc.S | 2 +- > arch/arm/mach-omap2/sleep34xx.S | 1 + > arch/arm/mach-omap2/sleep43xx.S | 1 + > arch/arm/mach-omap2/sleep44xx.S | 1 + > arch/arm/mach-tango/Makefile | 3 --- > arch/arm/mach-tango/smc.S | 1 + > 17 files changed, 10 insertions(+), 30 deletions(-) [...] > 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 For Tango: Acked-by: Mans Rullgard -- M?ns Rullg?rd