Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Arnd Bergmann <arnd@kernel.org>, Will Deacon <will@kernel.org>
Cc: linux-kbuild@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Ard Biesheuvel <ardb@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Brian Gerst <brgerst@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>,
	Marc Zyngier <maz@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>, Takashi Iwai <tiwai@suse.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Uros Bizjak <ubizjak@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	x86@kernel.org
Subject: Re: [PATCH 4/4] arm64: drop binutils version checks
Date: Tue, 8 Apr 2025 15:05:05 +0100	[thread overview]
Message-ID: <Z_UtEbZK9kmXtkb2@J2N7QTR9R3.cambridge.arm.com> (raw)
In-Reply-To: <20250407094116.1339199-5-arnd@kernel.org>

Hi Arnd,

On Mon, Apr 07, 2025 at 11:41:16AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Now that gcc-8 and binutils-2.30 are the minimum versions, a lot of
> the individual feature checks can go away for simplification.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

To address Will's concern, I grabbed the LLVM 13.0.1 (since that's the
minimum supported version) from https://www.kernel.org/pub//tools/llvm/,
and using v6.15-rc1 I checked the Kconfig resulting from:

  # magic script that puts the toolchain in my $PATH
  usekorg-llvm 13.0.1 make ARCH=arm64 LLVM=1 defconfig
  usekorg-llvm 13.0.1 make ARCH=arm64 LLVM=1 menuconfig

I then applied this series, and built a defconfig kernel with the same
toolchain, which built cleanly and boots fine.

The gist is that everything looks good, so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

More specifically, with that I see:

	CC_IS_CLANG [=y]
	AS_IS_LLVM [=y]
	LD_IS_LLD [=y]

... and I've noted each of the Kconfig options below.

[...]

> -config ARM64_LD_HAS_FIX_ERRATUM_843419
> -	def_bool $(ld-option,--fix-cortex-a53-843419)

	ARM64_LD_HAS_FIX_ERRATUM_843419 [=y] 

> -config AS_HAS_LSE_ATOMICS
> -	def_bool $(as-instr,.arch_extension lse)

	AS_HAS_LSE_ATOMICS [=y]

> -config AS_HAS_ARMV8_2
> -	def_bool $(cc-option,-Wa$(comma)-march=armv8.2-a)

	AS_HAS_ARMV8_2 [=y]

> -config AS_HAS_SHA3
> -	def_bool $(as-instr,.arch armv8.2-a+sha3)

	AS_HAS_SHA3 [=y]

> -config CC_HAS_SIGN_RETURN_ADDRESS
> -	# GCC 7, 8
> -	def_bool $(cc-option,-msign-return-address=all)

	 CC_HAS_SIGN_RETURN_ADDRESS [=y]

> -config AS_HAS_ARMV8_3
> -	def_bool $(cc-option,-Wa$(comma)-march=armv8.3-a)

	AS_HAS_ARMV8_3 [=y]

>  config AS_HAS_CFI_NEGATE_RA_STATE
> +	# binutils 2.34+
>  	def_bool $(as-instr,.cfi_startproc\n.cfi_negate_ra_state\n.cfi_endproc\n)

	AS_HAS_CFI_NEGATE_RA_STATE [=y]

> -config AS_HAS_LDAPR
> -	def_bool $(as-instr,.arch_extension rcpc)

	AS_HAS_LDAPR [=y]

> -config AS_HAS_ARMV8_4
> -	def_bool $(cc-option,-Wa$(comma)-march=armv8.4-a)

	AS_HAS_ARMV8_4 [=y]

> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 1d5dfcd1c13e..73a10f65ce8b 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -16,14 +16,11 @@ ifeq ($(CONFIG_RELOCATABLE), y)
>  # Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
>  # for relative relocs, since this leads to better Image compression
>  # with the relocation offsets always being zero.
> -LDFLAGS_vmlinux		+= -shared -Bsymbolic -z notext \
> -			$(call ld-option, --no-apply-dynamic-relocs)
> +LDFLAGS_vmlinux	+= -shared -Bsymbolic -z notext --no-apply-dynamic-relocs
>  endif

Looks good:

  [mark@lakrids:~/src/linux]% usekorg-llvm 13.0.1 ld.lld -shared -Bsymbolic -z notext --made-up-argument       
  ld.lld: error: unknown argument '--made-up-argument'
  [mark@lakrids:~/src/linux]% usekorg-llvm 13.0.1 ld.lld -shared -Bsymbolic -z notext --no-apply-dynamic-relocs
  ld.lld: error: no input files

>  ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
> -  ifeq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y)
>  LDFLAGS_vmlinux	+= --fix-cortex-a53-843419
> -  endif
>  endif

Looks good:

  [mark@lakrids:~/src/linux]% usekorg-llvm 13.0.1 ld.lld --made-up-argument
  ld.lld: error: unknown argument '--made-up-argument'
  [mark@lakrids:~/src/linux]% usekorg-llvm 13.0.1 ld.lld --fix-cortex-a53-843419
  ld.lld: error: no input files

[...]

>  ifeq ($(CONFIG_AS_HAS_ARMV8_5), y)
>    asm-arch := armv8.5-a
> -else ifeq ($(CONFIG_AS_HAS_ARMV8_4), y)
> +else
>    asm-arch := armv8.4-a
> -else ifeq ($(CONFIG_AS_HAS_ARMV8_3), y)
> -  asm-arch := armv8.3-a
> -else ifeq ($(CONFIG_AS_HAS_ARMV8_2), y)
> -  asm-arch := armv8.2-a
>  endif

Looks good; this was checked in Kconfig.

[...]

>  archprepare:
>  	$(Q)$(MAKE) $(build)=arch/arm64/tools kapi
> -ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
> -  ifneq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y)
> -	@echo "warning: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum" >&2
> -  endif
> -endif
> -ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y)
> -  ifneq ($(CONFIG_ARM64_LSE_ATOMICS),y)
> -	@echo "warning: LSE atomics not supported by binutils" >&2
> -  endif
> -endif

Looks good; both were checked in Kconfig.

[...]

> -#ifdef CONFIG_AS_HAS_LDAPR
>  #define __LOAD_RCPC(sfx, regs...)					\
>  	ALTERNATIVE(							\
>  		"ldar"	#sfx "\t" #regs,				\
>  		".arch_extension rcpc\n"				\
>  		"ldapr"	#sfx "\t" #regs,				\
>  	ARM64_HAS_LDAPR)
> -#else
> -#define __LOAD_RCPC(sfx, regs...)	"ldar" #sfx "\t" #regs
> -#endif /* CONFIG_AS_HAS_LDAPR */

Looks good.

>  
>  /*
>   * When building with LTO, there is an increased risk of the compiler
> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
> index 096e45acadb2..713248f240e0 100644
> --- a/arch/arm64/kvm/Kconfig
> +++ b/arch/arm64/kvm/Kconfig
> @@ -19,7 +19,6 @@ if VIRTUALIZATION
>  
>  menuconfig KVM
>  	bool "Kernel-based Virtual Machine (KVM) support"
> -	depends on AS_HAS_ARMV8_4
>  	select KVM_COMMON
>  	select KVM_GENERIC_HARDWARE_ENABLING
>  	select KVM_GENERIC_MMU_NOTIFIER

Looks good.

> diff --git a/arch/arm64/lib/xor-neon.c b/arch/arm64/lib/xor-neon.c
> index f9a53b7f9842..8fffebfa17b2 100644
> --- a/arch/arm64/lib/xor-neon.c
> +++ b/arch/arm64/lib/xor-neon.c
> @@ -319,7 +319,7 @@ static void xor_arm64_eor3_5(unsigned long bytes,
>  
>  static int __init xor_neon_init(void)
>  {
> -	if (IS_ENABLED(CONFIG_AS_HAS_SHA3) && cpu_have_named_feature(SHA3)) {
> +	if (cpu_have_named_feature(SHA3)) {

Looks good.

Mark.

  parent reply	other threads:[~2025-04-08 14:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07  9:41 [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Arnd Bergmann
2025-04-07  9:41 ` [PATCH 1/4] kbuild: require gcc-8 and binutils-2.30 Arnd Bergmann
2025-05-15 18:28   ` Eric Biggers
2025-05-16  8:14     ` Arnd Bergmann
2025-04-07  9:41 ` [PATCH 2/4] raid6: skip avx512 checks Arnd Bergmann
2025-04-07  9:41 ` [PATCH 3/4] x86: remove checks for binutils-2.30 and earlier Arnd Bergmann
2025-04-07  9:41 ` [PATCH 4/4] arm64: drop binutils version checks Arnd Bergmann
2025-04-08  8:46   ` Will Deacon
2025-04-08 13:10     ` Arnd Bergmann
2025-04-11 16:02       ` Will Deacon
2025-04-08 14:05   ` Mark Rutland [this message]
2025-04-07 16:41 ` [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Eric Biggers
2025-04-07 18:21   ` David Laight
2025-04-07 18:30   ` Ingo Molnar
2025-04-08  7:43   ` Arnd Bergmann
2025-04-08  8:16     ` Ingo Molnar
2025-04-08 14:20 ` Mark Rutland
2025-04-08 17:16   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_UtEbZK9kmXtkb2@J2N7QTR9R3.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=ubizjak@gmail.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox