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=-11.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 F3602C18E5B for ; Tue, 17 Mar 2020 07:56:00 +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 BE78B20663 for ; Tue, 17 Mar 2020 07:56:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EzG0eML3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="XVkIrOVE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE78B20663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=agner.ch 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:Message-ID:References:In-Reply-To: Subject:To:From:Date:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fByTlkUryn1jhHOcz8spgncnOZ0L7iyN0wqPbzSxTfM=; b=EzG0eML3h4bPxp /wfCfk+gidEQAxQrHGJaHJkGJYZ2cdjE1zdUJRsdl/xyjZdyPdTWMqTU0kVAXhAa6alf94vsMLlDa kctKKKWfxNOKs4vjcMntuIGae/DpXwxBrrkbZnoeMo6VBhABg27P/apOxN5P7EsYvszDA/yfI1xw5 FjqZK9H+HJRvvMrZtpR6KfNyV+UHV0LlSNpYDn8QKx4ckKri1jbbhnoExlroyqMS0LaLeR9TlCQUW xU9aaKeuGnIzdjPSW/Tq2Um9W+lqjdidUJe0vXL0tiohBqxQ+QoEIzwopMx5FnnOERwRzH5fQi/fu tX+y1tAXhQt8UDg2GJ4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jE74s-0006r4-Qp; Tue, 17 Mar 2020 07:55:54 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jE74o-0006eQ-BP for linux-arm-kernel@lists.infradead.org; Tue, 17 Mar 2020 07:55:52 +0000 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 989095C0103; Tue, 17 Mar 2020 08:55:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1584431745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p3KVNi+Ory+PQWNhNehyp69k/05vP43IyXekB0qsnHY=; b=XVkIrOVEZKLTLr/TEn5jiDgZkGpH+kf+fDq2LuXJxf4Wu19ollYOy7FNTptWdotjlo0Bnl 9J7hiQ/PzatQP9rX1qfsxfaj24Enfe708N68CAl5Z0v3QhE8gGgVWQSvqbUvbnoUdzUAQe jCrsMwbWP3q2cGDo9rYIUlzWfPEFsqU= MIME-Version: 1.0 Date: Tue, 17 Mar 2020 08:55:45 +0100 From: Stefan Agner To: Nick Desaulniers Subject: Re: [PATCH] ARM: warn if pre-UAL assembler syntax is used In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.1 Message-ID: X-Sender: stefan@agner.ch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200317_005550_987956_1276CEEA X-CRM114-Status: GOOD ( 19.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , clang-built-linux , LKML , Russell King , Jian Cai , Masahiro Yamada , Manoj Gupta , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-03-17 01:00, Nick Desaulniers wrote: > Revert "ARM: 8846/1: warn if divided syntax assembler is used"On Thu, > Feb 27, 2020 at 4:19 PM Stefan Agner wrote: >> >> Remove the -mno-warn-deprecated assembler flag for GCC versions newer >> than 5.1 to make sure the GNU assembler warns in case non-unified >> syntax is used. > > Hi Stefan, sorry for the late reply from me; digging out my backlog. > Do you happen to have a godbolt link perhaps that demonstrates this? > It sounds like GCC itself is emitting pre-UAL? Yes, that is what Russell observed and caused the revert: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b752bb405a13 I do not have a godbolt link at hand, I just built the complete kernel using some GCC toolchains I had locally available and noticed that the problem persists up to and including GCC 5.0. I did not track down what exactly is causing GCC to emit pre-UAL. > >> >> This also prevents a warning when building with Clang and enabling >> its integrated assembler: >> clang-10: error: unsupported argument '-mno-warn-deprecated' to option 'Wa,' >> >> This is a second attempt of commit e8c24bbda7d5 ("ARM: 8846/1: warn if >> divided syntax assembler is used"). > > Would it be helpful to also make note of > commit b752bb405a13 ("Revert "ARM: 8846/1: warn if divided syntax > assembler is used"")? Sure, I can do that. > > >> >> Signed-off-by: Stefan Agner >> --- >> arch/arm/Makefile | 14 +++++++++----- >> 1 file changed, 9 insertions(+), 5 deletions(-) >> >> diff --git a/arch/arm/Makefile b/arch/arm/Makefile >> index db857d07114f..a6c8c9f39185 100644 >> --- a/arch/arm/Makefile >> +++ b/arch/arm/Makefile >> @@ -119,21 +119,25 @@ ifeq ($(CONFIG_CC_IS_CLANG),y) >> CFLAGS_ABI += -meabi gnu >> endif >> >> -# Accept old syntax despite ".syntax unified" >> -AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) > > This existing code is quite bad for Clang, which doesn't support > `-Wa,-mno-warn-deprecated`, so this falls back to `-Wa,-W`, which > disables all warnings from the assembler, which we definitely do not > want. That alone is worth putting in the GCC guard. But I would like > more info about GCC above before signing off. FWIW, I submitted this to the patch tracker already, but I don't think it got merged already. -- Stefan > >> - >> ifeq ($(CONFIG_THUMB2_KERNEL),y) >> -CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN) >> +CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always >> AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb >> # Work around buggy relocation from gas if requested: >> ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) >> KBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls >> endif >> else >> -CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) >> +CFLAGS_ISA :=$(call cc-option,-marm,) >> AFLAGS_ISA :=$(CFLAGS_ISA) >> endif >> >> +ifeq ($(CONFIG_CC_IS_GCC),y) >> +ifeq ($(call cc-ifversion, -lt, 0501, y), y) >> +# GCC <5.1 emits pre-UAL code and causes assembler warnings, suppress them >> +CFLAGS_ISA +=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) >> +endif >> +endif >> + >> # Need -Uarm for gcc < 3.x >> KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm >> KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float >> -- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel