From patchwork Mon May 16 21:09: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: 12851454 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1A327C433EF for ; Mon, 16 May 2022 21:11:20 +0000 (UTC) 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:Mime-Version: Message-Id: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=rdhVY0GXPwa6dSSZIxs1nSdCOi3z35UC5ywpilGKUgA=; b=sxy 8XwLdnJKNcZ+yYa/kbuWoF1geLJB5Z89BzXIASAnveTa9sQnZpG+CSVIrGmx1hwJxk+H0g27hKQUX NWzsnielJW+cesWMeakSZCDRoJyn+A2Iq4Smnh8qnhi68SahNi4ZZ22Nl9iiKw4vv1VP7QTfhy5Ld 4uLePtCrJ2LeeUFmaNnsO7xI9XDuRmhikcdbNNeIazvk2BOY84uuZ20lI3YfdqF+dkZLXKLYHN5zK XxxM6p7G/3iWye1OTj7/xqhzKrrWqSkbImWqJPy55fH8rI+FAgA4uZvC8UiNTghVV1ujL/oZ93ZbN O/Il02fa9eKlgivqr1kchl63EDDw9Zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqhyl-00ACXQ-Rt; Mon, 16 May 2022 21:10:11 +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 1nqhyi-00ACW2-GL for linux-arm-kernel@lists.infradead.org; Mon, 16 May 2022 21:10:10 +0000 Received: by mail-yb1-xb49.google.com with SMTP id d188-20020a25cdc5000000b00648429e5ab9so14101146ybf.13 for ; Mon, 16 May 2022 14:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=FZcSyeZsO9IL5sGZuwA1FFxJdj4vwGJ4vjI3g4Z2mBk=; b=Bx7tgt+GJfqaLCs7xBMlT7qFLIwiPAwovX3m4OrDqEAu4mraTTnFTrHLsZlBXSYwEd S9NV+5/yKgYiy//X7fyyyi9qEzfSo11N2NGm9LtwMN4jqNFfeNb9uG/a6QKN59Q2YCX7 vHA+1Jld+DnCpZCLfn/1/+uk6RNWLTl6QoRe8Y3mDmyiJW90vwozTDGsxiPiQFQHjgX8 imq/7dPd+H0KTJd/I8085oKBUynPopN2VnrIxnA0LtnNS/pkVlxY0t5D02cUN8rYKeq9 BKwzNqNWEJJ41+ZJCV7KTfi3QncaffOx2ihSMKc/kZMxDtBbCeuoyh7ghugflNSW/l97 VY4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=FZcSyeZsO9IL5sGZuwA1FFxJdj4vwGJ4vjI3g4Z2mBk=; b=JF5sk06X/9N0EmGqNkpwWWHU8LND0WO2sSS+WjBjoXsEpYtCMz3mgGZ2SIph7SacpV ioVgqvphbEHWPP3PIhntDogVIkrIE2C3SYziyuY+csKFJxcWR38s+DMpEPE2rlzURN9Q O8KrLR31OZyVzBFinDhof4XTUQ7QIuRUTa8b8ujb6FW8WuoYplHu8uj5z+IM4klz0QhM o3XhpEGqC/eQ2Yyo+M4/q9fXYMtsCMibCtS4e5vc5QIfxt6hxBgDIsh31osz8D8iI0hU gIAYl+NHXweg+iBOIraONkodNiK08v1IvUZXrWUOSEzT4sJT31PaSAUVJim7z3sGMc66 sNAw== X-Gm-Message-State: AOAM531Fo+zHADEDrrHkls8Rsa4xlbRUL+9Qw2ySt3mZ6W+vdTbPvtvu AHYniXhL4D6WRbWC9EK/5robGcV7qvxJV0y7w48= X-Google-Smtp-Source: ABdhPJzceMbqMCWcaHO+Vaq4YPwgIaTtdI456jBiTN6H9DjqGxN7HtVrx2dWttRmI63nR6Bo6qP6htuKd+wL0/i1wGU= X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:2ef0:b8de:b9c8:da45]) (user=ndesaulniers job=sendgmr) by 2002:a05:6902:1501:b0:649:ff91:5409 with SMTP id q1-20020a056902150100b00649ff915409mr19972941ybu.278.1652735402915; Mon, 16 May 2022 14:10:02 -0700 (PDT) Date: Mon, 16 May 2022 14:09:50 -0700 Message-Id: <20220516210954.1660716-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Developer-Key: i=ndesaulniers@google.com; a=ed25519; pk=lvO/pmg+aaCb6dPhyGC1GyOCvPueDrrc8Zeso5CaGKE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1652735394; l=2928; s=20211004; h=from:subject; bh=nQYhTiVBaVqJ4Yl9K4hhhOCSOYjfiGjNQuRqR5ZoaZY=; b=MlL9nMS36OSe4Xc71noVArPyrOx9FfKJ4WVEjRfBsGB6qnO0RlQm4T/J0zfA7HK3VONHQk0DUkNF 9HCJ9boqDoPPJ8T3o7x4TYAe9ONvn4bz+m/8mAmV0RwDV2Rj4Jlz X-Mailer: git-send-email 2.36.0.550.gb090851708-goog Subject: [PATCH v3 0/4] pass -march= only to compiler From: Nick Desaulniers To: Arnd Bergmann , Ard@google.com, Biesheuvel@google.com Cc: Russell King , Masahiro Yamada , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nick Desaulniers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220516_141008_581185_97B1A257 X-CRM114-Status: GOOD ( 11.14 ) 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+linux-arm-kernel=archiver.kernel.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. Fixing this will allow us to enable -Werror=unused-command-line-argument for clang builds. 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 | 76 ++++++++++++++++------------- 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/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 + 41 files changed, 94 insertions(+), 74 deletions(-) base-commit: 0ac824f379fba2c2b17b75fd5ada69cd68c66348