From patchwork Wed Mar 24 07:11:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12160355 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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 4FCE1C433C1 for ; Wed, 24 Mar 2021 07:13:38 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 E0395619F5 for ; Wed, 24 Mar 2021 07:13:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0395619F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: 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=1C4WO3/7ioDjbJvAj6AI6G3LLblePdNm68pidZf7SKk=; b=W7kwL7QM7ptiEw+YGZtgZV+eRs hr5lS2eG1AVXPOpXficySaFUPbeTgHd3y+Bf1r7p91ABf0+oxwempvN+ttM/Q4VkGQO2nb+PJAoeP DgWM20o2i8nBVhSYGb58kKsYCJl212aCeCOzPpDF6bBnra/pcr4LMUPjBdBo/jFu4GeAucuRY6HnT tBh3so2jUay02q09qwv6Oud5PfaUhpkwPLwkxudMkcVi2NCmnsBDbVrvj52kkCmG0wDsYncB9jTFo 2Yn/lxM7MaQQcpmpqq+h93tusIG+4UA/oQWNsryiR0nsnAHYnkbU7o0Vehs14xJ+hZZIC5P3GFdYc diSdRnPA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOxgQ-00GSVz-1a; Wed, 24 Mar 2021 07:12:02 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOxgJ-00GSUW-P8 for linux-arm-kernel@lists.infradead.org; Wed, 24 Mar 2021 07:12:00 +0000 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-08.nifty.com with ESMTP id 12O7BVKu022145; Wed, 24 Mar 2021 16:11:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 12O7BVKu022145 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1616569891; bh=E24/Hi4hh0dLHOpU4tPgNkmKmpiDpZO+w1BHFp1aBEQ=; h=From:To:Cc:Subject:Date:From; b=sK5TV14pjccbzlNGSwDQxOMJog2/cutWLa7DQ/9xDlb1Z7MYBXWeMZBbYHqQ5aeSr J2eWZuQZQhUnpsJuwUR7tJjXkg9WLDScoPBtNJ/cyXh98mjHmATpKVB7J+4qGVC13q beKX7X14+s5zK9ilmy/F392UQA3luT9Fmv5s7Zt2ZveM6YroK3GFNLj5zx0rlohR9Y JuYZqh92lrrYKk3xshdUq7ii21IGeUpuEV/Pi3O33iCIxKl2MGXfJdy8R2Bk0AbIBy H5El8PooQqXxcY9s7EnsdAlgzbmpGSNYc1SnnREBfUKC8LX/uq3j3EcCYQnt13NnIv SUDQqAbSzm94w== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Catalin Marinas , Will Deacon Subject: [PATCH] arm64: move --fix-cortex-a53-843419 linker test to Kconfig Date: Wed, 24 Mar 2021 16:11:28 +0900 Message-Id: <20210324071128.1723273-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210324_071156_837000_73CD50B1 X-CRM114-Status: GOOD ( 12.84 ) 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 $(call ld-option, --fix-cortex-a53-843419) in arch/arm64/Makefile is evaluated every time even for Make targets that do not need the linker, such as "make ARCH=arm64 install". Recently, the Kbuild tree queued up a patch to avoid needless compiler/linker flag evaluation. I beleive it is a good improvement itself, but causing a false-positive warning for arm64 installation in linux-next. (Thanks to Nathan for the report) Kconfig can test the linker capability just once, and store it in the .config file. The build and installation steps that follow do not need to test the liniker over again. Reported-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Acked-by: Will Deacon Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor --- I was not sure what the preferred CONFIG option name is. Please suggest a one if you have a better idea. arch/arm64/Kconfig | 3 +++ arch/arm64/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 5656e7aacd69..4a33428de8ac 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -521,6 +521,9 @@ config ARM64_ERRATUM_843419 If unsure, say Y. +config ARM64_LD_HAS_FIX_ERRATUM_843419 + def_bool $(ld-option,--fix-cortex-a53-843419) + config ARM64_ERRATUM_1024718 bool "Cortex-A55: 1024718: Update of DBM/AP bits without break before make might result in incorrect update" default y diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 5b84aec31ed3..7ef44478560d 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -21,7 +21,7 @@ LDFLAGS_vmlinux += -shared -Bsymbolic -z notext \ endif ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) - ifeq ($(call ld-option, --fix-cortex-a53-843419),) + ifneq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y) $(warning ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum) else LDFLAGS_vmlinux += --fix-cortex-a53-843419