From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFFFAC282CE for ; Tue, 9 Apr 2019 12:26:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ABB7420857 for ; Tue, 9 Apr 2019 12:26:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QoE1eh6G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABB7420857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mansr.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To: Date:References: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=Y2QcstCxTRtIXTAoAyaXm+Si/cjF6PDPP/Ts/jcua1Y=; b=QoE1eh6G4EDIlR 8+GrE6ZYWQFAPJnT5bonbDDR+drKUoFmB0fgi1L6UT/0rMw2UgbMp/dKqgJ9BSDcpIeBZxdU8wmAT YjFjOPB280nASWXpckdDPOv9XGiDa5POThSQmpSW6TUHsBi9/l3OEVv/bIqKdAFIjetHdtiv3k1H/ rTIdqVr+KMCvWaF+FUbw69JAAmkQNG21fpX7wybwFZdfYcPkgJUWIFAVujCdJO9m9poRIAw0BD2Lc DsI3fah96AY/MJM4xl83C+Nzdjf3t/OLf4fJpBJPQQkux/g7bJcNFrHY6T44S2L/aO9Uj05msyPdP GcP0E5hr4AI4CBzQsFyg==; 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 1hDppE-0005Ik-BP; Tue, 09 Apr 2019 12:26:04 +0000 Received: from unicorn.mansr.com ([2001:8b0:ca0d:8d8e::2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDppA-0005IJ-Ii for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2019 12:26:02 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 953AA17C68; Tue, 9 Apr 2019 13:25:43 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Stefan Agner Subject: Re: [PATCH v2 1/3] ARM: use arch_extension directive instead of arch argument References: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> Date: Tue, 09 Apr 2019 13:25:43 +0100 In-Reply-To: <7b3b9d2150d491b5cb3761d96b215749ea63175f.1554757135.git.stefan@agner.ch> (Stefan Agner's message of "Mon, 8 Apr 2019 22:59:53 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190409_052600_940494_03BAA2D6 X-CRM114-Status: GOOD ( 19.44 ) 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, tony@atomide.com, robh@kernel.org, f.fainelli@gmail.com, gregory.clement@bootlin.com, linux@armlinux.org.uk, krzk@kernel.org, arm@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, kgene@kernel.org, robin.murphy@arm.com Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 build > errors such as this: > clang-8: error: the clang compiler does not support '-Wa,-march=3Darmv7= -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=3D40186 > [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/bcm_kona_smc.c b/arch/arm/mach-bcm/bcm_kon= a_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" > : "=3Dr" (ip), "=3Dr" (r0) > : "r" (r4), "r" (r5), "r" (r6) [...] > 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-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 Is there some reason these three don't need the .arch directive? -- = M=E5ns Rullg=E5rd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel