Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: drop binutils version checks

Now that gcc-8 and binutils-2.30 are the minimum versions, a lot of
the individual feature checks can go away for simplification.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+5 -60
+2 -35
arch/arm64/Kconfig
··· 642 642 643 643 If unsure, say Y. 644 644 645 - config ARM64_LD_HAS_FIX_ERRATUM_843419 646 - def_bool $(ld-option,--fix-cortex-a53-843419) 647 - 648 645 config ARM64_ERRATUM_1024718 649 646 bool "Cortex-A55: 1024718: Update of DBM/AP bits without break before make might result in incorrect update" 650 647 default y ··· 1887 1890 The feature is detected at runtime, and will remain as a 'nop' 1888 1891 instruction if the cpu does not implement the feature. 1889 1892 1890 - config AS_HAS_LSE_ATOMICS 1891 - def_bool $(as-instr,.arch_extension lse) 1892 - 1893 1893 config ARM64_LSE_ATOMICS 1894 1894 bool 1895 1895 default ARM64_USE_LSE_ATOMICS 1896 - depends on AS_HAS_LSE_ATOMICS 1897 1896 1898 1897 config ARM64_USE_LSE_ATOMICS 1899 1898 bool "Atomic instructions" ··· 1901 1908 1902 1909 Say Y here to make use of these instructions for the in-kernel 1903 1910 atomic routines. This incurs a small overhead on CPUs that do 1904 - not support these instructions and requires the kernel to be 1905 - built with binutils >= 2.25 in order for the new instructions 1906 - to be used. 1911 + not support these instructions. 1907 1912 1908 1913 endmenu # "ARMv8.1 architectural features" 1909 1914 1910 1915 menu "ARMv8.2 architectural features" 1911 - 1912 - config AS_HAS_ARMV8_2 1913 - def_bool $(cc-option,-Wa$(comma)-march=armv8.2-a) 1914 - 1915 - config AS_HAS_SHA3 1916 - def_bool $(as-instr,.arch armv8.2-a+sha3) 1917 1916 1918 1917 config ARM64_PMEM 1919 1918 bool "Enable support for persistent memory" ··· 1980 1995 bool "Use pointer authentication for kernel" 1981 1996 default y 1982 1997 depends on ARM64_PTR_AUTH 1983 - depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_ARMV8_3 1984 1998 # Modern compilers insert a .note.gnu.property section note for PAC 1985 1999 # which is only understood by binutils starting with version 2.33.1. 1986 2000 depends on LD_IS_LLD || LD_VERSION >= 23301 || (CC_IS_GCC && GCC_VERSION < 90100) ··· 2000 2016 # GCC 9 or later, clang 8 or later 2001 2017 def_bool $(cc-option,-mbranch-protection=pac-ret+leaf) 2002 2018 2003 - config CC_HAS_SIGN_RETURN_ADDRESS 2004 - # GCC 7, 8 2005 - def_bool $(cc-option,-msign-return-address=all) 2006 - 2007 - config AS_HAS_ARMV8_3 2008 - def_bool $(cc-option,-Wa$(comma)-march=armv8.3-a) 2009 - 2010 2019 config AS_HAS_CFI_NEGATE_RA_STATE 2020 + # binutils 2.34+ 2011 2021 def_bool $(as-instr,.cfi_startproc\n.cfi_negate_ra_state\n.cfi_endproc\n) 2012 - 2013 - config AS_HAS_LDAPR 2014 - def_bool $(as-instr,.arch_extension rcpc) 2015 2022 2016 2023 endmenu # "ARMv8.3 architectural features" 2017 2024 ··· 2031 2056 correctly reflect reality. Most commonly, the value read will be 0, 2032 2057 indicating that the counter is not enabled. 2033 2058 2034 - config AS_HAS_ARMV8_4 2035 - def_bool $(cc-option,-Wa$(comma)-march=armv8.4-a) 2036 - 2037 2059 config ARM64_TLB_RANGE 2038 2060 bool "Enable support for tlbi range feature" 2039 2061 default y 2040 - depends on AS_HAS_ARMV8_4 2041 2062 help 2042 2063 ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a 2043 2064 range of input addresses. 2044 - 2045 - The feature introduces new assembly instructions, and they were 2046 - support when binutils >= 2.30. 2047 2065 2048 2066 endmenu # "ARMv8.4 architectural features" 2049 2067 ··· 2113 2145 default y 2114 2146 depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI 2115 2147 depends on AS_HAS_ARMV8_5 2116 - depends on AS_HAS_LSE_ATOMICS 2117 2148 # Required for tag checking in the uaccess routines 2118 2149 select ARM64_PAN 2119 2150 select ARCH_HAS_SUBPAGE_FAULTS
+2 -19
arch/arm64/Makefile
··· 16 16 # Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour 17 17 # for relative relocs, since this leads to better Image compression 18 18 # with the relocation offsets always being zero. 19 - LDFLAGS_vmlinux += -shared -Bsymbolic -z notext \ 20 - $(call ld-option, --no-apply-dynamic-relocs) 19 + LDFLAGS_vmlinux += -shared -Bsymbolic -z notext --no-apply-dynamic-relocs 21 20 endif 22 21 23 22 ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) 24 - ifeq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y) 25 23 LDFLAGS_vmlinux += --fix-cortex-a53-843419 26 - endif 27 24 endif 28 25 29 26 cc_has_k_constraint := $(call try-run,echo \ ··· 102 105 # hardware. 103 106 ifeq ($(CONFIG_AS_HAS_ARMV8_5), y) 104 107 asm-arch := armv8.5-a 105 - else ifeq ($(CONFIG_AS_HAS_ARMV8_4), y) 108 + else 106 109 asm-arch := armv8.4-a 107 - else ifeq ($(CONFIG_AS_HAS_ARMV8_3), y) 108 - asm-arch := armv8.3-a 109 - else ifeq ($(CONFIG_AS_HAS_ARMV8_2), y) 110 - asm-arch := armv8.2-a 111 110 endif 112 111 113 112 ifdef asm-arch ··· 194 201 195 202 archprepare: 196 203 $(Q)$(MAKE) $(build)=arch/arm64/tools kapi 197 - ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) 198 - ifneq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y) 199 - @echo "warning: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum" >&2 200 - endif 201 - endif 202 - ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y) 203 - ifneq ($(CONFIG_ARM64_LSE_ATOMICS),y) 204 - @echo "warning: LSE atomics not supported by binutils" >&2 205 - endif 206 - endif 207 204 208 205 ifeq ($(KBUILD_EXTMOD),) 209 206 # We need to generate vdso-offsets.h before compiling certain files in kernel/.
-4
arch/arm64/include/asm/rwonce.h
··· 12 12 13 13 #ifndef BUILD_VDSO 14 14 15 - #ifdef CONFIG_AS_HAS_LDAPR 16 15 #define __LOAD_RCPC(sfx, regs...) \ 17 16 ALTERNATIVE( \ 18 17 "ldar" #sfx "\t" #regs, \ 19 18 ".arch_extension rcpc\n" \ 20 19 "ldapr" #sfx "\t" #regs, \ 21 20 ARM64_HAS_LDAPR) 22 - #else 23 - #define __LOAD_RCPC(sfx, regs...) "ldar" #sfx "\t" #regs 24 - #endif /* CONFIG_AS_HAS_LDAPR */ 25 21 26 22 /* 27 23 * When building with LTO, there is an increased risk of the compiler
-1
arch/arm64/kvm/Kconfig
··· 19 19 20 20 menuconfig KVM 21 21 bool "Kernel-based Virtual Machine (KVM) support" 22 - depends on AS_HAS_ARMV8_4 23 22 select KVM_COMMON 24 23 select KVM_GENERIC_HARDWARE_ENABLING 25 24 select KVM_GENERIC_MMU_NOTIFIER
+1 -1
arch/arm64/lib/xor-neon.c
··· 319 319 320 320 static int __init xor_neon_init(void) 321 321 { 322 - if (IS_ENABLED(CONFIG_AS_HAS_SHA3) && cpu_have_named_feature(SHA3)) { 322 + if (cpu_have_named_feature(SHA3)) { 323 323 xor_block_inner_neon.do_3 = xor_arm64_eor3_3; 324 324 xor_block_inner_neon.do_4 = xor_arm64_eor3_4; 325 325 xor_block_inner_neon.do_5 = xor_arm64_eor3_5;