From patchwork Fri Oct 14 20:13:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 1690148 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Uj+HXN/X; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=mo9CmUUM; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MpyKW0D5Jz23jf for ; Sat, 15 Oct 2022 07:14:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: Mime-Version:Date: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=8ESailfMAatI91IidMO/V9mVNUXWzKwHv4rTnLe94po=; b=Uj+ HXN/XtIcRvpxzjwQxJkagRTG4Rtljsmi2HQAZbewhKH7pNZAff24WUKAw9CaEncX9tmHef7E4VAZZ T6GBA9jBAGRiMAO3yDxeM+DXZpR49u+Ty0qImr7kXwPMwpjMAhTzM+lNtM4YjMqxzLThQ55Ul21zC yIwmJFMcEXYcxexsSppgZxXrZbSmpPjfBb7xI3IE5NBMOlHWkVWWKRBNdCoxkbILiQc/sfal+qEHu MnX6VCdW2BaQI34Q04Z/6kHMrRItLG8V2daTDRW5HkE9YOxpQAi6SKBNK5YKSRaCt/y9gtbwTdahg RhZM/P0Agl1/lwfz9EFyd19Vss9C1+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojR4P-00FmTk-5U; Fri, 14 Oct 2022 20:14:13 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojR4L-00FmT0-Ch for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2022 20:14:11 +0000 Received: by mail-yb1-xb49.google.com with SMTP id a2-20020a5b0ec2000000b006c108ecf390so5162062ybs.9 for ; Fri, 14 Oct 2022 13:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=s3obta7+4jpsxJjGufR8RmHp+D4xEEYHKC+46IVfYMg=; b=mo9CmUUMdRpfCf1BqHvLOZiOPSkOBTRiws9esonvY6HL8h7ba+rKQG2UZQCYwLrxMu wK4Qpi6Y5gA2JDxIZ4B4Qm9EtAviDDngaRT/GqIpz+1Uied19OsHI4504VP5ATSm4MKI UF8/McecB6Lfa+hyrQ+vJJ1CfjddtfxojbDFTS9F38jtgImsDIxcJHYlcAGmoOhZfEUP QYo8mOph/McaR45tulTZyk8YeLAoZwc6UMiDz7Y3CqVTyhskSjmUhTVDU1d7ZlhnEWyQ wwd99n1EgQvSlfah1WL/Q3rXRbxZ4cgnk56WvOQnyQEhzg4MShv+iG6IdvddCZ0XgT/b tX/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=s3obta7+4jpsxJjGufR8RmHp+D4xEEYHKC+46IVfYMg=; b=3AWh6P0x52YooFjyyUziQSDZTlc/BBGLyXTS7JLgKXDLSC1XHKALf9nTxLxKPuXU1m IqEMe9FRVR4SJebgO78mBzyDzM4PHfcrd9rmEA0ruqpDcJ5Ey6VWWMGVpc+JyiuGLA/f +DvnMarxAvTpEHPXCScBHGsuVwb5hUxKIHYSBMz5GB2M/6UXY6kOPlw+XfIAOsirohKF ilXb4AWTsp4n2PERVxlqw9+kdmJvRPu9MAnck6F+jyXWs8IXwoFEuMQDmWqdxKxhPuQ+ Uv6P6nfLdz/2QqrW8qSDWnFqSY0i7N2C0UAn6IJkK8vD9mpX41PPFOe/KWjSbgctDPST i3/Q== X-Gm-Message-State: ACrzQf0u5sm/Ot3uZpBwa5hI4AZ1vmxTSiYZcgfBy3lfFqChkqrcKiFU kpx2PN+yJvgQDunSLvnwQAZWZhBEoBh0G0yL1cc= X-Google-Smtp-Source: AMsMyM7Sxa9uXolZSaNYf6qnyKcfhLQsqFTuuKh9YootYfPXSve/V/uD1ICzJRJvCo7/V9ExOV5N2S/1SHsM4STSfMg= X-Received: from ndesaulniers-desktop.svl.corp.google.com ([2620:0:100e:712:2ba5:63af:4077:4515]) (user=ndesaulniers job=sendgmr) by 2002:a0d:ea97:0:b0:354:d656:7e40 with SMTP id t145-20020a0dea97000000b00354d6567e40mr6017256ywe.421.1665778446291; Fri, 14 Oct 2022 13:14:06 -0700 (PDT) Date: Fri, 14 Oct 2022 13:13:50 -0700 Mime-Version: 1.0 X-Developer-Key: i=ndesaulniers@google.com; a=ed25519; pk=UIrHvErwpgNbhCkRZAYSX0CFd/XFEwqX3D0xqtqjNug= X-Developer-Signature: v=1; a=ed25519-sha256; t=1665778433; l=3162; i=ndesaulniers@google.com; s=20220923; h=from:subject; bh=6WE50nrg4uUCeHIllAF+DlEWwXV19s8fgb2dD/cMHyI=; b=X+EmZHmGxUWmuu1FBspMvMc8/hsqTc1LFxbFjYnBl4K/Pm+LC0YjN/wpU3EKSbO+qqKM09KVrLf9 WOLqxe7LBj4YAj8RIUOWNUH6s9FV/XLS9lqBzPH8q38NJnfgaAPE X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog Message-ID: <20221014201354.3190007-1-ndesaulniers@google.com> Subject: [PATCH v4 0/4] pass -march= only to compiler From: Nick Desaulniers To: Russell King Cc: Arnd Bergmann , Ard Biesheuvel , Masahiro Yamada , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , Nick Desaulniers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221014_131409_469853_0C9C1E12 X-CRM114-Status: GOOD ( 11.20 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When both -march= and -Wa,-march= are specified for assembler or assembler-with-cpp sources, GCC and Clang will prefer the -Wa,-march= value but Clang will warn that -march= is unused. warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument] Content analysis details: (-7.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:b49 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org When both -march= and -Wa,-march= are specified for assembler or assembler-with-cpp sources, GCC and Clang will prefer the -Wa,-march= value but Clang will warn that -march= is unused. warning: argument unused during compilation: '-march=armv6k' [-Wunused-command-line-argument] This is the top group of warnings we observe when using clang to assemble the kernel via `ARCH=arm make LLVM=1`. Arnd sent a v2 of my previous patch https://lore.kernel.org/linux-arm-kernel/20210928154143.2106903-14-arnd@kernel.org/ I added yet a few more instances I found since then. Nathan pointed out a new one too that I've fixed since v3. Fixing this will allow us to enable -Werror=unused-command-line-argument for clang builds. v3 had an issue wrt. __thumb2__ https://lore.kernel.org/llvm/CAKwvOdmkd2PxvMUZA=A-72eATGDZkqDj--Bv1W+Xt_K_LWdROA@mail.gmail.com/ I've incorporated idea from Nathan and Ard on that. Nick Desaulniers (4): ARM: remove lazy evaluation in Makefile ARM: use .arch directives instead of assembler command line flags ARM: only use -mtp=cp15 for the compiler ARM: pass -march= only to compiler arch/arm/Makefile | 78 ++++++++++++++++------------- arch/arm/boot/compressed/Makefile | 1 - arch/arm/common/Makefile | 2 - arch/arm/common/mcpm_head.S | 2 + arch/arm/common/vlock.S | 2 + arch/arm/kernel/Makefile | 2 - arch/arm/kernel/hyp-stub.S | 2 + arch/arm/kernel/swp_emulate.c | 1 + arch/arm/lib/Makefile | 4 -- arch/arm/lib/delay-loop.S | 4 ++ arch/arm/mach-at91/Makefile | 3 -- arch/arm/mach-at91/pm_suspend.S | 4 ++ arch/arm/mach-imx/Makefile | 3 -- arch/arm/mach-imx/headsmp.S | 2 + arch/arm/mach-imx/resume-imx6.S | 2 + arch/arm/mach-imx/suspend-imx6.S | 2 + arch/arm/mach-mvebu/Makefile | 3 -- arch/arm/mach-mvebu/coherency_ll.S | 1 + arch/arm/mach-mvebu/pmsu.c | 1 + arch/arm/mach-npcm/Makefile | 2 - arch/arm/mach-npcm/headsmp.S | 2 + arch/arm/mach-tegra/Makefile | 2 - arch/arm/mach-tegra/reset-handler.S | 2 + arch/arm/mach-tegra/sleep-tegra20.S | 2 + arch/arm/mach-tegra/sleep-tegra30.S | 2 + arch/arm/mach-tegra/sleep.S | 2 + arch/arm/mm/Makefile | 15 ------ arch/arm/mm/abort-ev6.S | 1 + arch/arm/mm/abort-ev7.S | 1 + arch/arm/mm/cache-v6.S | 2 + arch/arm/mm/cache-v7.S | 2 + arch/arm/mm/cache-v7m.S | 2 + arch/arm/mm/copypage-feroceon.c | 1 + arch/arm/mm/proc-v6.S | 2 + arch/arm/mm/proc-v7-2level.S | 2 + arch/arm/mm/proc-v7.S | 2 + arch/arm/mm/tlb-v6.S | 2 + arch/arm/mm/tlb-v7.S | 2 + drivers/memory/Makefile | 2 - drivers/memory/ti-emif-sram-pm.S | 1 + drivers/soc/bcm/brcmstb/pm/Makefile | 1 - drivers/soc/bcm/brcmstb/pm/s2-arm.S | 1 + 42 files changed, 97 insertions(+), 75 deletions(-) Reviewed-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor