* [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
@ 2025-04-07 9:41 Arnd Bergmann
2025-04-07 9:41 ` [PATCH 1/4] kbuild: require gcc-8 and binutils-2.30 Arnd Bergmann
` (5 more replies)
0 siblings, 6 replies; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-07 9:41 UTC (permalink / raw)
To: linux-kbuild
Cc: Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
From: Arnd Bergmann <arnd@arndb.de>
x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
actually go through all version checks and make this is the minimum
for all architectures.
Most of the actual resulting changes are actually for raising the
binutils version, which eliminates version checks on x86 and arm64.
Arnd Bergmann (4):
kbuild: require gcc-8 and binutils-2.30
raid6: skip avx512 checks
x86: remove checks for binutils-2.30 and earlier
arm64: drop binutils version checks
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Uros Bizjak <ubizjak@gmail.com>
Cc: Will Deacon <will@kernel.org>
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: x86@kernel.org
Documentation/admin-guide/README.rst | 2 +-
Documentation/kbuild/makefiles.rst | 4 +-
Documentation/process/changes.rst | 4 +-
.../translations/it_IT/process/changes.rst | 4 +-
.../translations/zh_CN/admin-guide/README.rst | 2 +-
arch/arm64/Kconfig | 37 +--------------
arch/arm64/Makefile | 21 +--------
arch/arm64/include/asm/rwonce.h | 4 --
arch/arm64/kvm/Kconfig | 1 -
arch/arm64/lib/xor-neon.c | 2 +-
arch/um/Makefile | 4 +-
arch/x86/Kconfig.assembler | 29 ------------
arch/x86/crypto/Kconfig | 2 +-
arch/x86/crypto/Makefile | 12 +++--
arch/x86/crypto/aes-ctr-avx-x86_64.S | 2 -
arch/x86/crypto/aes-xts-avx-x86_64.S | 2 -
arch/x86/crypto/aesni-intel_glue.c | 21 +--------
arch/x86/crypto/aria-aesni-avx-asm_64.S | 10 -----
arch/x86/crypto/aria-aesni-avx2-asm_64.S | 10 +----
arch/x86/crypto/aria_aesni_avx2_glue.c | 4 +-
arch/x86/crypto/aria_aesni_avx_glue.c | 4 +-
arch/x86/crypto/blake2s-core.S | 4 --
arch/x86/crypto/blake2s-glue.c | 6 +--
arch/x86/crypto/chacha_glue.c | 6 +--
arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 8 ----
arch/x86/crypto/poly1305_glue.c | 4 +-
arch/x86/crypto/sha1_ssse3_glue.c | 10 -----
arch/x86/crypto/sha256_ssse3_glue.c | 10 -----
include/linux/unroll.h | 4 +-
kernel/gcov/gcc_4_7.c | 4 --
lib/raid6/algos.c | 6 ---
lib/raid6/avx512.c | 4 --
lib/raid6/recov_avx512.c | 6 ---
lib/raid6/test/Makefile | 3 --
lib/test_fortify/Makefile | 5 +--
scripts/Makefile.compiler | 2 +-
scripts/gcc-plugins/gcc-common.h | 45 -------------------
scripts/min-tool-version.sh | 6 +--
38 files changed, 36 insertions(+), 278 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/4] kbuild: require gcc-8 and binutils-2.30
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 ` Arnd Bergmann
2025-05-15 18:28 ` Eric Biggers
2025-04-07 9:41 ` [PATCH 2/4] raid6: skip avx512 checks Arnd Bergmann
` (4 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-07 9:41 UTC (permalink / raw)
To: linux-kbuild
Cc: Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
From: Arnd Bergmann <arnd@arndb.de>
Commit a3e8fe814ad1 ("x86/build: Raise the minimum GCC version to 8.1")
raised the minimum compiler version as enforced by Kbuild to gcc-8.1
and clang-15 for x86.
This is actually the same gcc version that has been discussed as the
minimum for all architectures several times in the past, with little
objection. A previous concern was the kernel for SLE15-SP7 needing to
be built with gcc-7. As this ended up still using linux-6.4 and there
is no plan for an SP8, this is no longer a problem.
Change it for all architectures and adjust the documentation accordingly.
A few version checks can be removed in the process. The binutils
version 2.30 is the lowest version used in combination with gcc-8 on
common distros, so use that as the corresponding minimum.
Link: https://lore.kernel.org/lkml/20240925150059.3955569-32-ardb+git@google.com/
Link: https://lore.kernel.org/lkml/871q7yxrgv.wl-tiwai@suse.de/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Documentation/admin-guide/README.rst | 2 +-
Documentation/kbuild/makefiles.rst | 4 +-
Documentation/process/changes.rst | 4 +-
.../translations/it_IT/process/changes.rst | 4 +-
.../translations/zh_CN/admin-guide/README.rst | 2 +-
arch/um/Makefile | 4 +-
include/linux/unroll.h | 4 +-
kernel/gcov/gcc_4_7.c | 4 --
lib/test_fortify/Makefile | 5 +--
scripts/Makefile.compiler | 2 +-
scripts/gcc-plugins/gcc-common.h | 45 -------------------
scripts/min-tool-version.sh | 6 +--
12 files changed, 14 insertions(+), 72 deletions(-)
diff --git a/Documentation/admin-guide/README.rst b/Documentation/admin-guide/README.rst
index 70b02f30013a..05301f03b717 100644
--- a/Documentation/admin-guide/README.rst
+++ b/Documentation/admin-guide/README.rst
@@ -259,7 +259,7 @@ Configuring the kernel
Compiling the kernel
--------------------
- - Make sure you have at least gcc 5.1 available.
+ - Make sure you have at least gcc 8.1 available.
For more information, refer to :ref:`Documentation/process/changes.rst <changes>`.
- Do a ``make`` to create a compressed kernel image. It is also possible to do
diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
index 3b9a8bc671e2..38cc656fac20 100644
--- a/Documentation/kbuild/makefiles.rst
+++ b/Documentation/kbuild/makefiles.rst
@@ -625,10 +625,10 @@ gcc-min-version
Example::
- cflags-$(call gcc-min-version, 70100) := -foo
+ cflags-$(call gcc-min-version, 110100) := -foo
In this example, cflags-y will be assigned the value -foo if $(CC) is gcc and
- $(CONFIG_GCC_VERSION) is >= 7.1.
+ $(CONFIG_GCC_VERSION) is >= 11.1.
clang-min-version
clang-min-version tests if the value of $(CONFIG_CLANG_VERSION) is greater
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index d564362773b5..41b1431f5a6b 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -29,13 +29,13 @@ you probably needn't concern yourself with pcmciautils.
====================== =============== ========================================
Program Minimal version Command to check the version
====================== =============== ========================================
-GNU C 5.1 gcc --version
+GNU C 8.1 gcc --version
Clang/LLVM (optional) 13.0.1 clang --version
Rust (optional) 1.78.0 rustc --version
bindgen (optional) 0.65.1 bindgen --version
GNU make 4.0 make --version
bash 4.2 bash --version
-binutils 2.25 ld -v
+binutils 2.30 ld -v
flex 2.5.35 flex --version
bison 2.0 bison --version
pahole 1.16 pahole --version
diff --git a/Documentation/translations/it_IT/process/changes.rst b/Documentation/translations/it_IT/process/changes.rst
index c7d05e2fff15..2e203fbd1785 100644
--- a/Documentation/translations/it_IT/process/changes.rst
+++ b/Documentation/translations/it_IT/process/changes.rst
@@ -32,13 +32,13 @@ PC Card, per esempio, probabilmente non dovreste preoccuparvi di pcmciautils.
====================== ================= ========================================
Programma Versione minima Comando per verificare la versione
====================== ================= ========================================
-GNU C 5.1 gcc --version
+GNU C 8.1 gcc --version
Clang/LLVM (optional) 13.0.0 clang --version
Rust (opzionale) 1.78.0 rustc --version
bindgen (opzionale) 0.65.1 bindgen --version
GNU make 4.0 make --version
bash 4.2 bash --version
-binutils 2.25 ld -v
+binutils 2.30 ld -v
flex 2.5.35 flex --version
bison 2.0 bison --version
pahole 1.16 pahole --version
diff --git a/Documentation/translations/zh_CN/admin-guide/README.rst b/Documentation/translations/zh_CN/admin-guide/README.rst
index 1bdafdc4c8e2..82e628b77efd 100644
--- a/Documentation/translations/zh_CN/admin-guide/README.rst
+++ b/Documentation/translations/zh_CN/admin-guide/README.rst
@@ -224,7 +224,7 @@ Linux内核6.x版本 <http://kernel.org/>
编译内核
---------
- - 确保您至少有gcc 5.1可用。
+ - 确保您至少有gcc 8.1可用。
有关更多信息,请参阅 :ref:`Documentation/process/changes.rst <changes>` 。
- 执行 ``make`` 来创建压缩内核映像。如果您安装了lilo以适配内核makefile,
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 1d36a613aad8..599c167890ff 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -118,9 +118,7 @@ archprepare:
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h
LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
-ifdef CONFIG_LD_SCRIPT_DYN
-LINK-$(call gcc-min-version, 60100)$(CONFIG_CC_IS_CLANG) += -no-pie
-endif
+LINK-$(CONFIG_LD_SCRIPT_DYN) += -no-pie
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib
CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
diff --git a/include/linux/unroll.h b/include/linux/unroll.h
index 863fb69f6a7e..186b71de740f 100644
--- a/include/linux/unroll.h
+++ b/include/linux/unroll.h
@@ -11,10 +11,8 @@
#ifdef CONFIG_CC_IS_CLANG
#define __pick_unrolled(x, y) _Pragma(#x)
-#elif CONFIG_GCC_VERSION >= 80000
-#define __pick_unrolled(x, y) _Pragma(#y)
#else
-#define __pick_unrolled(x, y) /* not supported */
+#define __pick_unrolled(x, y) _Pragma(#y)
#endif
/**
diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index fd75b4a484d7..a08cc076f332 100644
--- a/kernel/gcov/gcc_4_7.c
+++ b/kernel/gcov/gcc_4_7.c
@@ -22,10 +22,6 @@
#define GCOV_COUNTERS 9
#elif (__GNUC__ >= 10)
#define GCOV_COUNTERS 8
-#elif (__GNUC__ >= 7)
-#define GCOV_COUNTERS 9
-#elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
-#define GCOV_COUNTERS 10
#else
#define GCOV_COUNTERS 9
#endif
diff --git a/lib/test_fortify/Makefile b/lib/test_fortify/Makefile
index 1c3f82ad8bb2..399cae880e1d 100644
--- a/lib/test_fortify/Makefile
+++ b/lib/test_fortify/Makefile
@@ -18,10 +18,7 @@ quiet_cmd_gen_fortify_log = CAT $@
$(obj)/test_fortify.log: $(addprefix $(obj)/, $(logs)) FORCE
$(call if_changed,gen_fortify_log)
-# GCC<=7 does not always produce *.d files.
-# Run the tests only for GCC>=8 or Clang.
-always-$(call gcc-min-version, 80000) += test_fortify.log
-always-$(CONFIG_CC_IS_CLANG) += test_fortify.log
+always-y += test_fortify.log
# Some architectures define __NO_FORTIFY if __SANITIZE_ADDRESS__ is undefined.
# Pass CFLAGS_KASAN to avoid warnings.
diff --git a/scripts/Makefile.compiler b/scripts/Makefile.compiler
index 8956587b8547..d74fad494b5b 100644
--- a/scripts/Makefile.compiler
+++ b/scripts/Makefile.compiler
@@ -60,7 +60,7 @@ cc-option-yn = $(if $(call cc-option,$1),y,n)
cc-disable-warning = $(if $(call cc-option,-W$(strip $1)),-Wno-$(strip $1))
# gcc-min-version
-# Usage: cflags-$(call gcc-min-version, 70100) += -foo
+# Usage: cflags-$(call gcc-min-version, 110100) += -foo
gcc-min-version = $(call test-ge, $(CONFIG_GCC_VERSION), $1)
# clang-min-version
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
index 3222c1070444..3fdaf1c4b258 100644
--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -3,11 +3,7 @@
#define GCC_COMMON_H_INCLUDED
#include "bversion.h"
-#if BUILDING_GCC_VERSION >= 6000
#include "gcc-plugin.h"
-#else
-#include "plugin.h"
-#endif
#include "plugin-version.h"
#include "config.h"
#include "system.h"
@@ -39,9 +35,7 @@
#include "hash-map.h"
-#if BUILDING_GCC_VERSION >= 7000
#include "memmodel.h"
-#endif
#include "emit-rtl.h"
#include "debug.h"
#include "target.h"
@@ -74,9 +68,7 @@
#include "context.h"
#include "tree-ssa-alias.h"
#include "tree-ssa.h"
-#if BUILDING_GCC_VERSION >= 7000
#include "tree-vrp.h"
-#endif
#include "tree-ssanames.h"
#include "print-tree.h"
#include "tree-eh.h"
@@ -149,16 +141,6 @@ static inline opt_pass *get_pass_for_id(int id)
return g->get_passes()->get_pass_for_id(id);
}
-#if BUILDING_GCC_VERSION < 6000
-/* gimple related */
-template <>
-template <>
-inline bool is_a_helper<const gassign *>::test(const_gimple gs)
-{
- return gs->code == GIMPLE_ASSIGN;
-}
-#endif
-
#define TODO_verify_ssa TODO_verify_il
#define TODO_verify_flow TODO_verify_il
#define TODO_verify_stmts TODO_verify_il
@@ -181,7 +163,6 @@ static inline const char *get_decl_section_name(const_tree decl)
#define varpool_get_node(decl) varpool_node::get(decl)
#define dump_varpool_node(file, node) (node)->dump(file)
-#if BUILDING_GCC_VERSION >= 8000
#define cgraph_create_edge(caller, callee, call_stmt, count, freq) \
(caller)->create_edge((callee), (call_stmt), (count))
@@ -189,15 +170,6 @@ static inline const char *get_decl_section_name(const_tree decl)
old_call_stmt, call_stmt, count, freq, reason) \
(caller)->create_edge_including_clones((callee), \
(old_call_stmt), (call_stmt), (count), (reason))
-#else
-#define cgraph_create_edge(caller, callee, call_stmt, count, freq) \
- (caller)->create_edge((callee), (call_stmt), (count), (freq))
-
-#define cgraph_create_edge_including_clones(caller, callee, \
- old_call_stmt, call_stmt, count, freq, reason) \
- (caller)->create_edge_including_clones((callee), \
- (old_call_stmt), (call_stmt), (count), (freq), (reason))
-#endif
typedef struct cgraph_node *cgraph_node_ptr;
typedef struct cgraph_edge *cgraph_edge_p;
@@ -293,14 +265,12 @@ static inline void cgraph_call_edge_duplication_hooks(cgraph_edge *cs1, cgraph_e
symtab->call_edge_duplication_hooks(cs1, cs2);
}
-#if BUILDING_GCC_VERSION >= 6000
typedef gimple *gimple_ptr;
typedef const gimple *const_gimple_ptr;
#define gimple gimple_ptr
#define const_gimple const_gimple_ptr
#undef CONST_CAST_GIMPLE
#define CONST_CAST_GIMPLE(X) CONST_CAST(gimple, (X))
-#endif
/* gimple related */
static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree lhs, tree op1, tree op2 MEM_STAT_DECL)
@@ -400,15 +370,7 @@ static inline void ipa_remove_stmt_references(symtab_node *referring_node, gimpl
referring_node->remove_stmt_references(stmt);
}
-#if BUILDING_GCC_VERSION < 6000
-#define get_inner_reference(exp, pbitsize, pbitpos, poffset, pmode, punsignedp, preversep, pvolatilep, keep_aligning) \
- get_inner_reference(exp, pbitsize, pbitpos, poffset, pmode, punsignedp, pvolatilep, keep_aligning)
-#define gen_rtx_set(ARG0, ARG1) gen_rtx_SET(VOIDmode, (ARG0), (ARG1))
-#endif
-
-#if BUILDING_GCC_VERSION >= 6000
#define gen_rtx_set(ARG0, ARG1) gen_rtx_SET((ARG0), (ARG1))
-#endif
#ifdef __cplusplus
static inline void debug_tree(const_tree t)
@@ -425,15 +387,8 @@ static inline void debug_gimple_stmt(const_gimple s)
#define debug_gimple_stmt(s) debug_gimple_stmt(CONST_CAST_GIMPLE(s))
#endif
-#if BUILDING_GCC_VERSION >= 7000
#define get_inner_reference(exp, pbitsize, pbitpos, poffset, pmode, punsignedp, preversep, pvolatilep, keep_aligning) \
get_inner_reference(exp, pbitsize, pbitpos, poffset, pmode, punsignedp, preversep, pvolatilep)
-#endif
-
-#if BUILDING_GCC_VERSION < 7000
-#define SET_DECL_ALIGN(decl, align) DECL_ALIGN(decl) = (align)
-#define SET_DECL_MODE(decl, mode) DECL_MODE(decl) = (mode)
-#endif
#if BUILDING_GCC_VERSION >= 14000
#define last_stmt(x) last_nondebug_stmt(x)
diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh
index 787868183b84..0d223b4a9445 100755
--- a/scripts/min-tool-version.sh
+++ b/scripts/min-tool-version.sh
@@ -14,15 +14,13 @@ fi
case "$1" in
binutils)
- echo 2.25.0
+ echo 2.30.0
;;
gcc)
if [ "$ARCH" = parisc64 ]; then
echo 12.0.0
- elif [ "$SRCARCH" = x86 ]; then
- echo 8.1.0
else
- echo 5.1.0
+ echo 8.1.0
fi
;;
llvm)
--
2.39.5
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/4] raid6: skip avx512 checks
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-04-07 9:41 ` Arnd Bergmann
2025-04-07 9:41 ` [PATCH 3/4] x86: remove checks for binutils-2.30 and earlier Arnd Bergmann
` (3 subsequent siblings)
5 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-07 9:41 UTC (permalink / raw)
To: linux-kbuild
Cc: Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
From: Arnd Bergmann <arnd@arndb.de>
It is no longer necessary to check for CONFIG_AS_AVX512, since the minimum
assembler version is now from binutils-2.30 and this always supports it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/raid6/algos.c | 6 ------
lib/raid6/avx512.c | 4 ----
lib/raid6/recov_avx512.c | 6 ------
lib/raid6/test/Makefile | 3 ---
4 files changed, 19 deletions(-)
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c
index cd2e88ee1f14..dfd3f800ac9b 100644
--- a/lib/raid6/algos.c
+++ b/lib/raid6/algos.c
@@ -28,10 +28,8 @@ EXPORT_SYMBOL_GPL(raid6_call);
const struct raid6_calls * const raid6_algos[] = {
#if defined(__i386__) && !defined(__arch_um__)
-#ifdef CONFIG_AS_AVX512
&raid6_avx512x2,
&raid6_avx512x1,
-#endif
&raid6_avx2x2,
&raid6_avx2x1,
&raid6_sse2x2,
@@ -42,11 +40,9 @@ const struct raid6_calls * const raid6_algos[] = {
&raid6_mmxx1,
#endif
#if defined(__x86_64__) && !defined(__arch_um__)
-#ifdef CONFIG_AS_AVX512
&raid6_avx512x4,
&raid6_avx512x2,
&raid6_avx512x1,
-#endif
&raid6_avx2x4,
&raid6_avx2x2,
&raid6_avx2x1,
@@ -96,9 +92,7 @@ EXPORT_SYMBOL_GPL(raid6_datap_recov);
const struct raid6_recov_calls *const raid6_recov_algos[] = {
#ifdef CONFIG_X86
-#ifdef CONFIG_AS_AVX512
&raid6_recov_avx512,
-#endif
&raid6_recov_avx2,
&raid6_recov_ssse3,
#endif
diff --git a/lib/raid6/avx512.c b/lib/raid6/avx512.c
index 9c3e822e1adf..009bd0adeebf 100644
--- a/lib/raid6/avx512.c
+++ b/lib/raid6/avx512.c
@@ -17,8 +17,6 @@
*
*/
-#ifdef CONFIG_AS_AVX512
-
#include <linux/raid/pq.h>
#include "x86.h"
@@ -560,5 +558,3 @@ const struct raid6_calls raid6_avx512x4 = {
.priority = 2 /* Prefer AVX512 over priority 1 (SSE2 and others) */
};
#endif
-
-#endif /* CONFIG_AS_AVX512 */
diff --git a/lib/raid6/recov_avx512.c b/lib/raid6/recov_avx512.c
index fd9e15bf3f30..310c715db313 100644
--- a/lib/raid6/recov_avx512.c
+++ b/lib/raid6/recov_avx512.c
@@ -6,8 +6,6 @@
* Author: Megha Dey <megha.dey@linux.intel.com>
*/
-#ifdef CONFIG_AS_AVX512
-
#include <linux/raid/pq.h>
#include "x86.h"
@@ -377,7 +375,3 @@ const struct raid6_recov_calls raid6_recov_avx512 = {
#endif
.priority = 3,
};
-
-#else
-#warning "your version of binutils lacks AVX512 support"
-#endif
diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile
index 2abe0076a636..8f2dd2210ba8 100644
--- a/lib/raid6/test/Makefile
+++ b/lib/raid6/test/Makefile
@@ -54,9 +54,6 @@ endif
ifeq ($(IS_X86),yes)
OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o avx512.o recov_avx512.o
CFLAGS += -DCONFIG_X86
- CFLAGS += $(shell echo "vpmovm2b %k1, %zmm5" | \
- gcc -c -x assembler - >/dev/null 2>&1 && \
- rm ./-.o && echo -DCONFIG_AS_AVX512=1)
else ifeq ($(HAS_NEON),yes)
OBJS += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o
CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1
--
2.39.5
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/4] x86: remove checks for binutils-2.30 and earlier
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-04-07 9:41 ` [PATCH 2/4] raid6: skip avx512 checks Arnd Bergmann
@ 2025-04-07 9:41 ` Arnd Bergmann
2025-04-07 9:41 ` [PATCH 4/4] arm64: drop binutils version checks Arnd Bergmann
` (2 subsequent siblings)
5 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-07 9:41 UTC (permalink / raw)
To: linux-kbuild
Cc: Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
From: Arnd Bergmann <arnd@arndb.de>
Linux now requires binutils-2.30, so a lot of the compile time
checks are unnecessary and can be removed.
Building with earlier assembler versions now causes a build failure
on the crypto drivers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/Kconfig.assembler | 29 -------------------
arch/x86/crypto/Kconfig | 2 +-
arch/x86/crypto/Makefile | 12 ++++----
arch/x86/crypto/aes-ctr-avx-x86_64.S | 2 --
arch/x86/crypto/aes-xts-avx-x86_64.S | 2 --
arch/x86/crypto/aesni-intel_glue.c | 21 ++------------
arch/x86/crypto/aria-aesni-avx-asm_64.S | 10 -------
arch/x86/crypto/aria-aesni-avx2-asm_64.S | 10 +------
arch/x86/crypto/aria_aesni_avx2_glue.c | 4 +--
arch/x86/crypto/aria_aesni_avx_glue.c | 4 +--
arch/x86/crypto/blake2s-core.S | 4 ---
arch/x86/crypto/blake2s-glue.c | 6 ++--
arch/x86/crypto/chacha_glue.c | 6 ++--
arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 8 -----
arch/x86/crypto/poly1305_glue.c | 4 +--
arch/x86/crypto/sha1_ssse3_glue.c | 10 -------
arch/x86/crypto/sha256_ssse3_glue.c | 10 -------
17 files changed, 17 insertions(+), 127 deletions(-)
diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler
index 6d20a6ce0507..977a08b3746d 100644
--- a/arch/x86/Kconfig.assembler
+++ b/arch/x86/Kconfig.assembler
@@ -1,40 +1,11 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
-config AS_AVX512
- def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5)
- help
- Supported by binutils >= 2.25 and LLVM integrated assembler
-
-config AS_SHA1_NI
- def_bool $(as-instr,sha1msg1 %xmm0$(comma)%xmm1)
- help
- Supported by binutils >= 2.24 and LLVM integrated assembler
-
-config AS_SHA256_NI
- def_bool $(as-instr,sha256msg1 %xmm0$(comma)%xmm1)
- help
- Supported by binutils >= 2.24 and LLVM integrated assembler
config AS_TPAUSE
def_bool $(as-instr,tpause %ecx)
help
Supported by binutils >= 2.31.1 and LLVM integrated assembler >= V7
-config AS_GFNI
- def_bool $(as-instr,vgf2p8mulb %xmm0$(comma)%xmm1$(comma)%xmm2)
- help
- Supported by binutils >= 2.30 and LLVM integrated assembler
-
-config AS_VAES
- def_bool $(as-instr,vaesenc %ymm0$(comma)%ymm1$(comma)%ymm2)
- help
- Supported by binutils >= 2.30 and LLVM integrated assembler
-
-config AS_VPCLMULQDQ
- def_bool $(as-instr,vpclmulqdq \$0x10$(comma)%ymm0$(comma)%ymm1$(comma)%ymm2)
- help
- Supported by binutils >= 2.30 and LLVM integrated assembler
-
config AS_WRUSS
def_bool $(as-instr64,wrussq %rax$(comma)(%rbx))
help
diff --git a/arch/x86/crypto/Kconfig b/arch/x86/crypto/Kconfig
index 3d948f10c94c..91954bd3d441 100644
--- a/arch/x86/crypto/Kconfig
+++ b/arch/x86/crypto/Kconfig
@@ -332,7 +332,7 @@ config CRYPTO_ARIA_AESNI_AVX2_X86_64
config CRYPTO_ARIA_GFNI_AVX512_X86_64
tristate "Ciphers: ARIA with modes: ECB, CTR (AVX512/GFNI)"
- depends on X86 && 64BIT && AS_AVX512 && AS_GFNI
+ depends on X86 && 64BIT
select CRYPTO_SKCIPHER
select CRYPTO_SIMD
select CRYPTO_ALGAPI
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index 5d19f41bde58..f9234af53353 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -44,24 +44,22 @@ aegis128-aesni-y := aegis128-aesni-asm.o aegis128-aesni-glue.o
obj-$(CONFIG_CRYPTO_CHACHA20_X86_64) += chacha-x86_64.o
chacha-x86_64-y := chacha-avx2-x86_64.o chacha-ssse3-x86_64.o chacha_glue.o
-chacha-x86_64-$(CONFIG_AS_AVX512) += chacha-avx512vl-x86_64.o
+chacha-x86_64-y += chacha-avx512vl-x86_64.o
obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o
aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o
aesni-intel-$(CONFIG_64BIT) += aes-ctr-avx-x86_64.o \
aes-gcm-aesni-x86_64.o \
aes-xts-avx-x86_64.o
-ifeq ($(CONFIG_AS_VAES)$(CONFIG_AS_VPCLMULQDQ),yy)
aesni-intel-$(CONFIG_64BIT) += aes-gcm-avx10-x86_64.o
-endif
obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o
-sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ssse3_glue.o
-sha1-ssse3-$(CONFIG_AS_SHA1_NI) += sha1_ni_asm.o
+sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ssse3_glue.o \
+ sha1_ni_asm.o
obj-$(CONFIG_CRYPTO_SHA256_SSSE3) += sha256-ssse3.o
-sha256-ssse3-y := sha256-ssse3-asm.o sha256-avx-asm.o sha256-avx2-asm.o sha256_ssse3_glue.o
-sha256-ssse3-$(CONFIG_AS_SHA256_NI) += sha256_ni_asm.o
+sha256-ssse3-y := sha256-ssse3-asm.o sha256-avx-asm.o sha256-avx2-asm.o \
+ sha256_ssse3_glue.o sha256_ni_asm.o
obj-$(CONFIG_CRYPTO_SHA512_SSSE3) += sha512-ssse3.o
sha512-ssse3-y := sha512-ssse3-asm.o sha512-avx-asm.o sha512-avx2-asm.o sha512_ssse3_glue.o
diff --git a/arch/x86/crypto/aes-ctr-avx-x86_64.S b/arch/x86/crypto/aes-ctr-avx-x86_64.S
index 1685d8b24b2c..c7189f3f3669 100644
--- a/arch/x86/crypto/aes-ctr-avx-x86_64.S
+++ b/arch/x86/crypto/aes-ctr-avx-x86_64.S
@@ -562,7 +562,6 @@ SYM_TYPED_FUNC_START(aes_xctr_crypt_aesni_avx)
_aes_ctr_crypt 1
SYM_FUNC_END(aes_xctr_crypt_aesni_avx)
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
.set VL, 32
.set USE_AVX10, 0
SYM_TYPED_FUNC_START(aes_ctr64_crypt_vaes_avx2)
@@ -589,4 +588,3 @@ SYM_FUNC_END(aes_ctr64_crypt_vaes_avx10_512)
SYM_TYPED_FUNC_START(aes_xctr_crypt_vaes_avx10_512)
_aes_ctr_crypt 1
SYM_FUNC_END(aes_xctr_crypt_vaes_avx10_512)
-#endif // CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ
diff --git a/arch/x86/crypto/aes-xts-avx-x86_64.S b/arch/x86/crypto/aes-xts-avx-x86_64.S
index 93ba0ddbe009..617c17e69b9f 100644
--- a/arch/x86/crypto/aes-xts-avx-x86_64.S
+++ b/arch/x86/crypto/aes-xts-avx-x86_64.S
@@ -861,7 +861,6 @@ SYM_TYPED_FUNC_START(aes_xts_decrypt_aesni_avx)
_aes_xts_crypt 0
SYM_FUNC_END(aes_xts_decrypt_aesni_avx)
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
.set VL, 32
.set USE_AVX10, 0
SYM_TYPED_FUNC_START(aes_xts_encrypt_vaes_avx2)
@@ -888,4 +887,3 @@ SYM_FUNC_END(aes_xts_encrypt_vaes_avx10_512)
SYM_TYPED_FUNC_START(aes_xts_decrypt_vaes_avx10_512)
_aes_xts_crypt 0
SYM_FUNC_END(aes_xts_decrypt_vaes_avx10_512)
-#endif /* CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ */
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index bc655d794a95..684fbfb12345 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -842,11 +842,9 @@ static struct simd_skcipher_alg * \
simd_skcipher_algs_##suffix[ARRAY_SIZE(skcipher_algs_##suffix)]
DEFINE_AVX_SKCIPHER_ALGS(aesni_avx, "aesni-avx", 500);
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
DEFINE_AVX_SKCIPHER_ALGS(vaes_avx2, "vaes-avx2", 600);
DEFINE_AVX_SKCIPHER_ALGS(vaes_avx10_256, "vaes-avx10_256", 700);
DEFINE_AVX_SKCIPHER_ALGS(vaes_avx10_512, "vaes-avx10_512", 800);
-#endif
/* The common part of the x86_64 AES-GCM key struct */
struct aes_gcm_key {
@@ -927,17 +925,8 @@ struct aes_gcm_key_avx10 {
#define FLAG_RFC4106 BIT(0)
#define FLAG_ENC BIT(1)
#define FLAG_AVX BIT(2)
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
-# define FLAG_AVX10_256 BIT(3)
-# define FLAG_AVX10_512 BIT(4)
-#else
- /*
- * This should cause all calls to the AVX10 assembly functions to be
- * optimized out, avoiding the need to ifdef each call individually.
- */
-# define FLAG_AVX10_256 0
-# define FLAG_AVX10_512 0
-#endif
+#define FLAG_AVX10_256 BIT(3)
+#define FLAG_AVX10_512 BIT(4)
static inline struct aes_gcm_key *
aes_gcm_key_get(struct crypto_aead *tfm, int flags)
@@ -1538,7 +1527,6 @@ DEFINE_GCM_ALGS(aesni_avx, FLAG_AVX,
"generic-gcm-aesni-avx", "rfc4106-gcm-aesni-avx",
AES_GCM_KEY_AESNI_SIZE, 500);
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
/* aes_gcm_algs_vaes_avx10_256 */
DEFINE_GCM_ALGS(vaes_avx10_256, FLAG_AVX10_256,
"generic-gcm-vaes-avx10_256", "rfc4106-gcm-vaes-avx10_256",
@@ -1548,7 +1536,6 @@ DEFINE_GCM_ALGS(vaes_avx10_256, FLAG_AVX10_256,
DEFINE_GCM_ALGS(vaes_avx10_512, FLAG_AVX10_512,
"generic-gcm-vaes-avx10_512", "rfc4106-gcm-vaes-avx10_512",
AES_GCM_KEY_AVX10_SIZE, 800);
-#endif /* CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ */
static int __init register_avx_algs(void)
{
@@ -1572,7 +1559,6 @@ static int __init register_avx_algs(void)
* Similarly, the assembler support was added at about the same time.
* For simplicity, just always check for VAES and VPCLMULQDQ together.
*/
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
if (!boot_cpu_has(X86_FEATURE_AVX2) ||
!boot_cpu_has(X86_FEATURE_VAES) ||
!boot_cpu_has(X86_FEATURE_VPCLMULQDQ) ||
@@ -1622,7 +1608,6 @@ static int __init register_avx_algs(void)
aes_gcm_simdalgs_vaes_avx10_512);
if (err)
return err;
-#endif /* CONFIG_AS_VAES && CONFIG_AS_VPCLMULQDQ */
return 0;
}
@@ -1636,7 +1621,6 @@ static void unregister_avx_algs(void)
simd_unregister_aeads(aes_gcm_algs_aesni_avx,
ARRAY_SIZE(aes_gcm_algs_aesni_avx),
aes_gcm_simdalgs_aesni_avx);
-#if defined(CONFIG_AS_VAES) && defined(CONFIG_AS_VPCLMULQDQ)
if (simd_skcipher_algs_vaes_avx2[0])
simd_unregister_skciphers(skcipher_algs_vaes_avx2,
ARRAY_SIZE(skcipher_algs_vaes_avx2),
@@ -1657,7 +1641,6 @@ static void unregister_avx_algs(void)
simd_unregister_aeads(aes_gcm_algs_vaes_avx10_512,
ARRAY_SIZE(aes_gcm_algs_vaes_avx10_512),
aes_gcm_simdalgs_vaes_avx10_512);
-#endif
}
#else /* CONFIG_X86_64 */
static struct aead_alg aes_gcm_algs_aesni[0];
diff --git a/arch/x86/crypto/aria-aesni-avx-asm_64.S b/arch/x86/crypto/aria-aesni-avx-asm_64.S
index 9556dacd9841..932fb17308e7 100644
--- a/arch/x86/crypto/aria-aesni-avx-asm_64.S
+++ b/arch/x86/crypto/aria-aesni-avx-asm_64.S
@@ -295,7 +295,6 @@
vpshufb t1, t0, t2; \
vpxor t2, x7, x7;
-#ifdef CONFIG_AS_GFNI
#define aria_sbox_8way_gfni(x0, x1, x2, x3, \
x4, x5, x6, x7, \
t0, t1, t2, t3, \
@@ -318,8 +317,6 @@
vgf2p8affineinvqb $0, t2, x3, x3; \
vgf2p8affineinvqb $0, t2, x7, x7
-#endif /* CONFIG_AS_GFNI */
-
#define aria_sbox_8way(x0, x1, x2, x3, \
x4, x5, x6, x7, \
t0, t1, t2, t3, \
@@ -561,7 +558,6 @@
y4, y5, y6, y7, \
mem_tmp, 8);
-#ifdef CONFIG_AS_GFNI
#define aria_fe_gfni(x0, x1, x2, x3, \
x4, x5, x6, x7, \
y0, y1, y2, y3, \
@@ -719,8 +715,6 @@
y4, y5, y6, y7, \
mem_tmp, 8);
-#endif /* CONFIG_AS_GFNI */
-
/* NB: section is mergeable, all elements must be aligned 16-byte blocks */
.section .rodata.cst16, "aM", @progbits, 16
.align 16
@@ -772,7 +766,6 @@
.Ltf_hi__x2__and__fwd_aff:
.octa 0x3F893781E95FE1576CDA64D2BA0CB204
-#ifdef CONFIG_AS_GFNI
/* AES affine: */
#define tf_aff_const BV8(1, 1, 0, 0, 0, 1, 1, 0)
.Ltf_aff_bitmatrix:
@@ -871,7 +864,6 @@
BV8(0, 0, 0, 0, 0, 1, 0, 0),
BV8(0, 0, 0, 0, 0, 0, 1, 0),
BV8(0, 0, 0, 0, 0, 0, 0, 1))
-#endif /* CONFIG_AS_GFNI */
/* 4-bit mask */
.section .rodata.cst4.L0f0f0f0f, "aM", @progbits, 4
@@ -1140,7 +1132,6 @@ SYM_TYPED_FUNC_START(aria_aesni_avx_ctr_crypt_16way)
RET;
SYM_FUNC_END(aria_aesni_avx_ctr_crypt_16way)
-#ifdef CONFIG_AS_GFNI
SYM_FUNC_START_LOCAL(__aria_aesni_avx_gfni_crypt_16way)
/* input:
* %r9: rk
@@ -1359,4 +1350,3 @@ SYM_TYPED_FUNC_START(aria_aesni_avx_gfni_ctr_crypt_16way)
FRAME_END
RET;
SYM_FUNC_END(aria_aesni_avx_gfni_ctr_crypt_16way)
-#endif /* CONFIG_AS_GFNI */
diff --git a/arch/x86/crypto/aria-aesni-avx2-asm_64.S b/arch/x86/crypto/aria-aesni-avx2-asm_64.S
index c60fa2980630..ed53d4f46bd7 100644
--- a/arch/x86/crypto/aria-aesni-avx2-asm_64.S
+++ b/arch/x86/crypto/aria-aesni-avx2-asm_64.S
@@ -302,7 +302,6 @@
vpbroadcastb ((round * 16) + idx + 4)(rk), t0; \
vpxor t0, x7, x7;
-#ifdef CONFIG_AS_GFNI
#define aria_sbox_8way_gfni(x0, x1, x2, x3, \
x4, x5, x6, x7, \
t0, t1, t2, t3, \
@@ -325,7 +324,6 @@
vgf2p8affineinvqb $0, t2, x3, x3; \
vgf2p8affineinvqb $0, t2, x7, x7
-#endif /* CONFIG_AS_GFNI */
#define aria_sbox_8way(x0, x1, x2, x3, \
x4, x5, x6, x7, \
t0, t1, t2, t3, \
@@ -598,7 +596,7 @@
aria_load_state_8way(y0, y1, y2, y3, \
y4, y5, y6, y7, \
mem_tmp, 8);
-#ifdef CONFIG_AS_GFNI
+
#define aria_fe_gfni(x0, x1, x2, x3, \
x4, x5, x6, x7, \
y0, y1, y2, y3, \
@@ -752,7 +750,6 @@
aria_load_state_8way(y0, y1, y2, y3, \
y4, y5, y6, y7, \
mem_tmp, 8);
-#endif /* CONFIG_AS_GFNI */
.section .rodata.cst32.shufb_16x16b, "aM", @progbits, 32
.align 32
@@ -806,7 +803,6 @@
.Ltf_hi__x2__and__fwd_aff:
.octa 0x3F893781E95FE1576CDA64D2BA0CB204
-#ifdef CONFIG_AS_GFNI
.section .rodata.cst8, "aM", @progbits, 8
.align 8
/* AES affine: */
@@ -868,8 +864,6 @@
BV8(0, 0, 0, 0, 0, 0, 1, 0),
BV8(0, 0, 0, 0, 0, 0, 0, 1))
-#endif /* CONFIG_AS_GFNI */
-
/* 4-bit mask */
.section .rodata.cst4.L0f0f0f0f, "aM", @progbits, 4
.align 4
@@ -1219,7 +1213,6 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_ctr_crypt_32way)
RET;
SYM_FUNC_END(aria_aesni_avx2_ctr_crypt_32way)
-#ifdef CONFIG_AS_GFNI
SYM_FUNC_START_LOCAL(__aria_aesni_avx2_gfni_crypt_32way)
/* input:
* %r9: rk
@@ -1438,4 +1431,3 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_gfni_ctr_crypt_32way)
FRAME_END
RET;
SYM_FUNC_END(aria_aesni_avx2_gfni_ctr_crypt_32way)
-#endif /* CONFIG_AS_GFNI */
diff --git a/arch/x86/crypto/aria_aesni_avx2_glue.c b/arch/x86/crypto/aria_aesni_avx2_glue.c
index 87a11804fc77..95fccc6dc420 100644
--- a/arch/x86/crypto/aria_aesni_avx2_glue.c
+++ b/arch/x86/crypto/aria_aesni_avx2_glue.c
@@ -26,7 +26,6 @@ asmlinkage void aria_aesni_avx2_ctr_crypt_32way(const void *ctx, u8 *dst,
const u8 *src,
u8 *keystream, u8 *iv);
EXPORT_SYMBOL_GPL(aria_aesni_avx2_ctr_crypt_32way);
-#ifdef CONFIG_AS_GFNI
asmlinkage void aria_aesni_avx2_gfni_encrypt_32way(const void *ctx, u8 *dst,
const u8 *src);
EXPORT_SYMBOL_GPL(aria_aesni_avx2_gfni_encrypt_32way);
@@ -37,7 +36,6 @@ asmlinkage void aria_aesni_avx2_gfni_ctr_crypt_32way(const void *ctx, u8 *dst,
const u8 *src,
u8 *keystream, u8 *iv);
EXPORT_SYMBOL_GPL(aria_aesni_avx2_gfni_ctr_crypt_32way);
-#endif /* CONFIG_AS_GFNI */
static struct aria_avx_ops aria_ops;
@@ -217,7 +215,7 @@ static int __init aria_avx2_init(void)
return -ENODEV;
}
- if (boot_cpu_has(X86_FEATURE_GFNI) && IS_ENABLED(CONFIG_AS_GFNI)) {
+ if (boot_cpu_has(X86_FEATURE_GFNI)) {
aria_ops.aria_encrypt_16way = aria_aesni_avx_gfni_encrypt_16way;
aria_ops.aria_decrypt_16way = aria_aesni_avx_gfni_decrypt_16way;
aria_ops.aria_ctr_crypt_16way = aria_aesni_avx_gfni_ctr_crypt_16way;
diff --git a/arch/x86/crypto/aria_aesni_avx_glue.c b/arch/x86/crypto/aria_aesni_avx_glue.c
index 4e1516b76669..487094d64863 100644
--- a/arch/x86/crypto/aria_aesni_avx_glue.c
+++ b/arch/x86/crypto/aria_aesni_avx_glue.c
@@ -26,7 +26,6 @@ asmlinkage void aria_aesni_avx_ctr_crypt_16way(const void *ctx, u8 *dst,
const u8 *src,
u8 *keystream, u8 *iv);
EXPORT_SYMBOL_GPL(aria_aesni_avx_ctr_crypt_16way);
-#ifdef CONFIG_AS_GFNI
asmlinkage void aria_aesni_avx_gfni_encrypt_16way(const void *ctx, u8 *dst,
const u8 *src);
EXPORT_SYMBOL_GPL(aria_aesni_avx_gfni_encrypt_16way);
@@ -37,7 +36,6 @@ asmlinkage void aria_aesni_avx_gfni_ctr_crypt_16way(const void *ctx, u8 *dst,
const u8 *src,
u8 *keystream, u8 *iv);
EXPORT_SYMBOL_GPL(aria_aesni_avx_gfni_ctr_crypt_16way);
-#endif /* CONFIG_AS_GFNI */
static struct aria_avx_ops aria_ops;
@@ -203,7 +201,7 @@ static int __init aria_avx_init(void)
return -ENODEV;
}
- if (boot_cpu_has(X86_FEATURE_GFNI) && IS_ENABLED(CONFIG_AS_GFNI)) {
+ if (boot_cpu_has(X86_FEATURE_GFNI)) {
aria_ops.aria_encrypt_16way = aria_aesni_avx_gfni_encrypt_16way;
aria_ops.aria_decrypt_16way = aria_aesni_avx_gfni_decrypt_16way;
aria_ops.aria_ctr_crypt_16way = aria_aesni_avx_gfni_ctr_crypt_16way;
diff --git a/arch/x86/crypto/blake2s-core.S b/arch/x86/crypto/blake2s-core.S
index b50b35ff1fdb..ac1c845445a4 100644
--- a/arch/x86/crypto/blake2s-core.S
+++ b/arch/x86/crypto/blake2s-core.S
@@ -29,7 +29,6 @@ SIGMA:
.byte 13, 7, 12, 3, 11, 14, 1, 9, 2, 5, 15, 8, 10, 0, 4, 6
.byte 6, 14, 11, 0, 15, 9, 3, 8, 10, 12, 13, 1, 5, 2, 7, 4
.byte 10, 8, 7, 1, 2, 4, 6, 5, 13, 15, 9, 3, 0, 11, 14, 12
-#ifdef CONFIG_AS_AVX512
.section .rodata.cst64.BLAKE2S_SIGMA2, "aM", @progbits, 640
.align 64
SIGMA2:
@@ -43,7 +42,6 @@ SIGMA2:
.long 6, 13, 0, 14, 12, 2, 1, 11, 15, 4, 5, 8, 7, 9, 3, 10
.long 15, 5, 4, 13, 10, 7, 3, 11, 12, 2, 0, 6, 9, 8, 1, 14
.long 8, 7, 14, 11, 13, 15, 0, 12, 10, 4, 5, 6, 3, 2, 1, 9
-#endif /* CONFIG_AS_AVX512 */
.text
SYM_FUNC_START(blake2s_compress_ssse3)
@@ -174,7 +172,6 @@ SYM_FUNC_START(blake2s_compress_ssse3)
RET
SYM_FUNC_END(blake2s_compress_ssse3)
-#ifdef CONFIG_AS_AVX512
SYM_FUNC_START(blake2s_compress_avx512)
vmovdqu (%rdi),%xmm0
vmovdqu 0x10(%rdi),%xmm1
@@ -253,4 +250,3 @@ SYM_FUNC_START(blake2s_compress_avx512)
vzeroupper
RET
SYM_FUNC_END(blake2s_compress_avx512)
-#endif /* CONFIG_AS_AVX512 */
diff --git a/arch/x86/crypto/blake2s-glue.c b/arch/x86/crypto/blake2s-glue.c
index 0313f9673f56..00f84f29cc8c 100644
--- a/arch/x86/crypto/blake2s-glue.c
+++ b/arch/x86/crypto/blake2s-glue.c
@@ -41,8 +41,7 @@ void blake2s_compress(struct blake2s_state *state, const u8 *block,
SZ_4K / BLAKE2S_BLOCK_SIZE);
kernel_fpu_begin();
- if (IS_ENABLED(CONFIG_AS_AVX512) &&
- static_branch_likely(&blake2s_use_avx512))
+ if (static_branch_likely(&blake2s_use_avx512))
blake2s_compress_avx512(state, block, blocks, inc);
else
blake2s_compress_ssse3(state, block, blocks, inc);
@@ -59,8 +58,7 @@ static int __init blake2s_mod_init(void)
if (boot_cpu_has(X86_FEATURE_SSSE3))
static_branch_enable(&blake2s_use_ssse3);
- if (IS_ENABLED(CONFIG_AS_AVX512) &&
- boot_cpu_has(X86_FEATURE_AVX) &&
+ if (boot_cpu_has(X86_FEATURE_AVX) &&
boot_cpu_has(X86_FEATURE_AVX2) &&
boot_cpu_has(X86_FEATURE_AVX512F) &&
boot_cpu_has(X86_FEATURE_AVX512VL) &&
diff --git a/arch/x86/crypto/chacha_glue.c b/arch/x86/crypto/chacha_glue.c
index 8bb74a272879..ce12ad807af1 100644
--- a/arch/x86/crypto/chacha_glue.c
+++ b/arch/x86/crypto/chacha_glue.c
@@ -48,8 +48,7 @@ static unsigned int chacha_advance(unsigned int len, unsigned int maxblocks)
static void chacha_dosimd(u32 *state, u8 *dst, const u8 *src,
unsigned int bytes, int nrounds)
{
- if (IS_ENABLED(CONFIG_AS_AVX512) &&
- static_branch_likely(&chacha_use_avx512vl)) {
+ if (static_branch_likely(&chacha_use_avx512vl)) {
while (bytes >= CHACHA_BLOCK_SIZE * 8) {
chacha_8block_xor_avx512vl(state, dst, src, bytes,
nrounds);
@@ -282,8 +281,7 @@ static int __init chacha_simd_mod_init(void)
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
static_branch_enable(&chacha_use_avx2);
- if (IS_ENABLED(CONFIG_AS_AVX512) &&
- boot_cpu_has(X86_FEATURE_AVX512VL) &&
+ if (boot_cpu_has(X86_FEATURE_AVX512VL) &&
boot_cpu_has(X86_FEATURE_AVX512BW)) /* kmovq */
static_branch_enable(&chacha_use_avx512vl);
}
diff --git a/arch/x86/crypto/poly1305-x86_64-cryptogams.pl b/arch/x86/crypto/poly1305-x86_64-cryptogams.pl
index b9abcd79c1f4..409ec6955733 100644
--- a/arch/x86/crypto/poly1305-x86_64-cryptogams.pl
+++ b/arch/x86/crypto/poly1305-x86_64-cryptogams.pl
@@ -2811,18 +2811,10 @@ if ($avx>2) {
# reason stack layout is kept identical to poly1305_blocks_avx2. If not
# for this tail, we wouldn't have to even allocate stack frame...
-if($kernel) {
- $code .= "#ifdef CONFIG_AS_AVX512\n";
-}
-
&declare_function("poly1305_blocks_avx512", 32, 4);
poly1305_blocks_avxN(1);
&end_function("poly1305_blocks_avx512");
-if ($kernel) {
- $code .= "#endif\n";
-}
-
if (!$kernel && $avx>3) {
########################################################################
# VPMADD52 version using 2^44 radix.
diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c
index 08ff4b489f7e..506a6f2beb78 100644
--- a/arch/x86/crypto/poly1305_glue.c
+++ b/arch/x86/crypto/poly1305_glue.c
@@ -107,7 +107,7 @@ static void poly1305_simd_blocks(void *ctx, const u8 *inp, size_t len,
const size_t bytes = min_t(size_t, len, SZ_4K);
kernel_fpu_begin();
- if (IS_ENABLED(CONFIG_AS_AVX512) && static_branch_likely(&poly1305_use_avx512))
+ if (static_branch_likely(&poly1305_use_avx512))
poly1305_blocks_avx512(ctx, inp, bytes, padbit);
else if (static_branch_likely(&poly1305_use_avx2))
poly1305_blocks_avx2(ctx, inp, bytes, padbit);
@@ -265,7 +265,7 @@ static int __init poly1305_simd_mod_init(void)
if (boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) &&
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL))
static_branch_enable(&poly1305_use_avx2);
- if (IS_ENABLED(CONFIG_AS_AVX512) && boot_cpu_has(X86_FEATURE_AVX) &&
+ if (boot_cpu_has(X86_FEATURE_AVX) &&
boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX512F) &&
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | XFEATURE_MASK_AVX512, NULL) &&
/* Skylake downclocks unacceptably much when using zmm, but later generations are fast. */
diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c
index ab8bc54f254d..abb793cbad01 100644
--- a/arch/x86/crypto/sha1_ssse3_glue.c
+++ b/arch/x86/crypto/sha1_ssse3_glue.c
@@ -28,9 +28,7 @@
#include <asm/simd.h>
static const struct x86_cpu_id module_cpu_ids[] = {
-#ifdef CONFIG_AS_SHA1_NI
X86_MATCH_FEATURE(X86_FEATURE_SHA_NI, NULL),
-#endif
X86_MATCH_FEATURE(X86_FEATURE_AVX2, NULL),
X86_MATCH_FEATURE(X86_FEATURE_AVX, NULL),
X86_MATCH_FEATURE(X86_FEATURE_SSSE3, NULL),
@@ -256,7 +254,6 @@ static void unregister_sha1_avx2(void)
crypto_unregister_shash(&sha1_avx2_alg);
}
-#ifdef CONFIG_AS_SHA1_NI
asmlinkage void sha1_ni_transform(struct sha1_state *digest, const u8 *data,
int rounds);
@@ -306,11 +303,6 @@ static void unregister_sha1_ni(void)
crypto_unregister_shash(&sha1_ni_alg);
}
-#else
-static inline int register_sha1_ni(void) { return 0; }
-static inline void unregister_sha1_ni(void) { }
-#endif
-
static int __init sha1_ssse3_mod_init(void)
{
if (!x86_match_cpu(module_cpu_ids))
@@ -360,6 +352,4 @@ MODULE_ALIAS_CRYPTO("sha1");
MODULE_ALIAS_CRYPTO("sha1-ssse3");
MODULE_ALIAS_CRYPTO("sha1-avx");
MODULE_ALIAS_CRYPTO("sha1-avx2");
-#ifdef CONFIG_AS_SHA1_NI
MODULE_ALIAS_CRYPTO("sha1-ni");
-#endif
diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c
index e04a43d9f7d5..429a3cefbab4 100644
--- a/arch/x86/crypto/sha256_ssse3_glue.c
+++ b/arch/x86/crypto/sha256_ssse3_glue.c
@@ -45,9 +45,7 @@ asmlinkage void sha256_transform_ssse3(struct sha256_state *state,
const u8 *data, int blocks);
static const struct x86_cpu_id module_cpu_ids[] = {
-#ifdef CONFIG_AS_SHA256_NI
X86_MATCH_FEATURE(X86_FEATURE_SHA_NI, NULL),
-#endif
X86_MATCH_FEATURE(X86_FEATURE_AVX2, NULL),
X86_MATCH_FEATURE(X86_FEATURE_AVX, NULL),
X86_MATCH_FEATURE(X86_FEATURE_SSSE3, NULL),
@@ -329,7 +327,6 @@ static void unregister_sha256_avx2(void)
ARRAY_SIZE(sha256_avx2_algs));
}
-#ifdef CONFIG_AS_SHA256_NI
asmlinkage void sha256_ni_transform(struct sha256_state *digest,
const u8 *data, int rounds);
@@ -403,11 +400,6 @@ static void unregister_sha256_ni(void)
ARRAY_SIZE(sha256_ni_algs));
}
-#else
-static inline int register_sha256_ni(void) { return 0; }
-static inline void unregister_sha256_ni(void) { }
-#endif
-
static int __init sha256_ssse3_mod_init(void)
{
if (!x86_match_cpu(module_cpu_ids))
@@ -461,7 +453,5 @@ MODULE_ALIAS_CRYPTO("sha224");
MODULE_ALIAS_CRYPTO("sha224-ssse3");
MODULE_ALIAS_CRYPTO("sha224-avx");
MODULE_ALIAS_CRYPTO("sha224-avx2");
-#ifdef CONFIG_AS_SHA256_NI
MODULE_ALIAS_CRYPTO("sha256-ni");
MODULE_ALIAS_CRYPTO("sha224-ni");
-#endif
--
2.39.5
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/4] arm64: drop binutils version checks
2025-04-07 9:41 [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Arnd Bergmann
` (2 preceding siblings ...)
2025-04-07 9:41 ` [PATCH 3/4] x86: remove checks for binutils-2.30 and earlier Arnd Bergmann
@ 2025-04-07 9:41 ` Arnd Bergmann
2025-04-08 8:46 ` Will Deacon
2025-04-08 14:05 ` Mark Rutland
2025-04-07 16:41 ` [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Eric Biggers
2025-04-08 14:20 ` Mark Rutland
5 siblings, 2 replies; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-07 9:41 UTC (permalink / raw)
To: linux-kbuild
Cc: Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
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>
---
arch/arm64/Kconfig | 37 ++-------------------------------
arch/arm64/Makefile | 21 ++-----------------
arch/arm64/include/asm/rwonce.h | 4 ----
arch/arm64/kvm/Kconfig | 1 -
arch/arm64/lib/xor-neon.c | 2 +-
5 files changed, 5 insertions(+), 60 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a182295e6f08..d33e3955566d 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -642,9 +642,6 @@ 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
@@ -1890,13 +1887,9 @@ config ARM64_PAN
The feature is detected at runtime, and will remain as a 'nop'
instruction if the cpu does not implement the feature.
-config AS_HAS_LSE_ATOMICS
- def_bool $(as-instr,.arch_extension lse)
-
config ARM64_LSE_ATOMICS
bool
default ARM64_USE_LSE_ATOMICS
- depends on AS_HAS_LSE_ATOMICS
config ARM64_USE_LSE_ATOMICS
bool "Atomic instructions"
@@ -1908,20 +1901,12 @@ config ARM64_USE_LSE_ATOMICS
Say Y here to make use of these instructions for the in-kernel
atomic routines. This incurs a small overhead on CPUs that do
- not support these instructions and requires the kernel to be
- built with binutils >= 2.25 in order for the new instructions
- to be used.
+ not support these instructions.
endmenu # "ARMv8.1 architectural features"
menu "ARMv8.2 architectural features"
-config AS_HAS_ARMV8_2
- def_bool $(cc-option,-Wa$(comma)-march=armv8.2-a)
-
-config AS_HAS_SHA3
- def_bool $(as-instr,.arch armv8.2-a+sha3)
-
config ARM64_PMEM
bool "Enable support for persistent memory"
select ARCH_HAS_PMEM_API
@@ -1995,7 +1980,6 @@ config ARM64_PTR_AUTH_KERNEL
bool "Use pointer authentication for kernel"
default y
depends on ARM64_PTR_AUTH
- depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_ARMV8_3
# Modern compilers insert a .note.gnu.property section note for PAC
# which is only understood by binutils starting with version 2.33.1.
depends on LD_IS_LLD || LD_VERSION >= 23301 || (CC_IS_GCC && GCC_VERSION < 90100)
@@ -2016,19 +2000,10 @@ config CC_HAS_BRANCH_PROT_PAC_RET
# GCC 9 or later, clang 8 or later
def_bool $(cc-option,-mbranch-protection=pac-ret+leaf)
-config CC_HAS_SIGN_RETURN_ADDRESS
- # GCC 7, 8
- def_bool $(cc-option,-msign-return-address=all)
-
-config AS_HAS_ARMV8_3
- def_bool $(cc-option,-Wa$(comma)-march=armv8.3-a)
-
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)
-config AS_HAS_LDAPR
- def_bool $(as-instr,.arch_extension rcpc)
-
endmenu # "ARMv8.3 architectural features"
menu "ARMv8.4 architectural features"
@@ -2056,20 +2031,13 @@ config ARM64_AMU_EXTN
correctly reflect reality. Most commonly, the value read will be 0,
indicating that the counter is not enabled.
-config AS_HAS_ARMV8_4
- def_bool $(cc-option,-Wa$(comma)-march=armv8.4-a)
-
config ARM64_TLB_RANGE
bool "Enable support for tlbi range feature"
default y
- depends on AS_HAS_ARMV8_4
help
ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a
range of input addresses.
- The feature introduces new assembly instructions, and they were
- support when binutils >= 2.30.
-
endmenu # "ARMv8.4 architectural features"
menu "ARMv8.5 architectural features"
@@ -2145,7 +2113,6 @@ config ARM64_MTE
default y
depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI
depends on AS_HAS_ARMV8_5
- depends on AS_HAS_LSE_ATOMICS
# Required for tag checking in the uaccess routines
select ARM64_PAN
select ARCH_HAS_SUBPAGE_FAULTS
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
ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
- ifeq ($(CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419),y)
LDFLAGS_vmlinux += --fix-cortex-a53-843419
- endif
endif
cc_has_k_constraint := $(call try-run,echo \
@@ -105,12 +102,8 @@ endif
# hardware.
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
ifdef asm-arch
@@ -201,16 +194,6 @@ install zinstall:
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
ifeq ($(KBUILD_EXTMOD),)
# We need to generate vdso-offsets.h before compiling certain files in kernel/.
diff --git a/arch/arm64/include/asm/rwonce.h b/arch/arm64/include/asm/rwonce.h
index 56f7b1d4d54b..97d9256d33c9 100644
--- a/arch/arm64/include/asm/rwonce.h
+++ b/arch/arm64/include/asm/rwonce.h
@@ -12,16 +12,12 @@
#ifndef BUILD_VDSO
-#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 */
/*
* 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
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)) {
xor_block_inner_neon.do_3 = xor_arm64_eor3_3;
xor_block_inner_neon.do_4 = xor_arm64_eor3_4;
xor_block_inner_neon.do_5 = xor_arm64_eor3_5;
--
2.39.5
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
2025-04-07 9:41 [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Arnd Bergmann
` (3 preceding siblings ...)
2025-04-07 9:41 ` [PATCH 4/4] arm64: drop binutils version checks Arnd Bergmann
@ 2025-04-07 16:41 ` Eric Biggers
2025-04-07 18:21 ` David Laight
` (2 more replies)
2025-04-08 14:20 ` Mark Rutland
5 siblings, 3 replies; 18+ messages in thread
From: Eric Biggers @ 2025-04-07 16:41 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kbuild, Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel,
Borislav Petkov, Brian Gerst, Catalin Marinas, Dave Hansen,
Herbert Xu, Ingo Molnar, Jonathan Corbet, Marc Zyngier,
Mark Rutland, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Takashi Iwai, Thomas Gleixner, Uros Bizjak, Will Deacon,
linux-arm-kernel, linux-crypto, linux-doc, linux-kernel,
linux-raid, x86
On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> actually go through all version checks and make this is the minimum
> for all architectures.
>
> Most of the actual resulting changes are actually for raising the
> binutils version, which eliminates version checks on x86 and arm64.
>
> Arnd Bergmann (4):
> kbuild: require gcc-8 and binutils-2.30
> raid6: skip avx512 checks
> x86: remove checks for binutils-2.30 and earlier
> arm64: drop binutils version checks
This is intended to supersede the patches from Uros that removed checks for
binutils < 2.25, right? See:
* https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
* https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
* https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
If we can indeed bump up the requirement to 2.30, that would be great.
Just a note though: I recently added VAES and VPCLMULQDQ instructions to
BoringSSL, which increased the binutils requirement of building BoringSSL to
2.30, and this caused issues in a downstream project; e.g. see
https://github.com/briansmith/ring/issues/2463. Specifically people complained
about being unable to build on Amazon Linux 2 and CentOS/RHEL/Oracle Linux 7.
So I just thought I'd mention that, based on past experience with this sort of
thing, those are the specific cases where it seems people are most likely to be
trying to use binutils < 2.30.
But if those distros are not going to be supported any longer (without
installing newer tools on them), or even are already unsupported due to the gcc
requirement, bumping up the binutils requirement to 2.30 sounds good to me.
- Eric
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
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
2 siblings, 0 replies; 18+ messages in thread
From: David Laight @ 2025-04-07 18:21 UTC (permalink / raw)
To: Eric Biggers
Cc: Arnd Bergmann, linux-kbuild, Arnd Bergmann, H. Peter Anvin,
Ard Biesheuvel, Borislav Petkov, Brian Gerst, Catalin Marinas,
Dave Hansen, Herbert Xu, Ingo Molnar, Jonathan Corbet,
Marc Zyngier, Mark Rutland, Masahiro Yamada, Nathan Chancellor,
Nicolas Schier, Takashi Iwai, Thomas Gleixner, Uros Bizjak,
Will Deacon, linux-arm-kernel, linux-crypto, linux-doc,
linux-kernel, linux-raid, x86
On Mon, 7 Apr 2025 09:41:51 -0700
Eric Biggers <ebiggers@kernel.org> wrote:
> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> > actually go through all version checks and make this is the minimum
> > for all architectures.
> >
> > Most of the actual resulting changes are actually for raising the
> > binutils version, which eliminates version checks on x86 and arm64.
> >
> > Arnd Bergmann (4):
> > kbuild: require gcc-8 and binutils-2.30
> > raid6: skip avx512 checks
> > x86: remove checks for binutils-2.30 and earlier
> > arm64: drop binutils version checks
>
> This is intended to supersede the patches from Uros that removed checks for
> binutils < 2.25, right? See:
>
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
>
> If we can indeed bump up the requirement to 2.30, that would be great.
>
> Just a note though: I recently added VAES and VPCLMULQDQ instructions to
> BoringSSL, which increased the binutils requirement of building BoringSSL to
> 2.30, and this caused issues in a downstream project; e.g. see
> https://github.com/briansmith/ring/issues/2463. Specifically people complained
> about being unable to build on Amazon Linux 2 and CentOS/RHEL/Oracle Linux 7.
Just tell them RHEL 7 is no longer supported :-)
(Was a right PITA installing an extra package on a CentOS 7 system we use as
a build machine...)
In any case it is relatively easy to install a later gcc - even though it ends
up in a very obscure place.
David
>
> So I just thought I'd mention that, based on past experience with this sort of
> thing, those are the specific cases where it seems people are most likely to be
> trying to use binutils < 2.30.
>
> But if those distros are not going to be supported any longer (without
> installing newer tools on them), or even are already unsupported due to the gcc
> requirement, bumping up the binutils requirement to 2.30 sounds good to me.
>
> - Eric
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
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
2 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2025-04-07 18:30 UTC (permalink / raw)
To: Eric Biggers
Cc: Arnd Bergmann, linux-kbuild, Arnd Bergmann, H. Peter Anvin,
Ard Biesheuvel, Borislav Petkov, Brian Gerst, Catalin Marinas,
Dave Hansen, Herbert Xu, Ingo Molnar, Jonathan Corbet,
Marc Zyngier, Mark Rutland, Masahiro Yamada, Nathan Chancellor,
Nicolas Schier, Takashi Iwai, Thomas Gleixner, Uros Bizjak,
Will Deacon, linux-arm-kernel, linux-crypto, linux-doc,
linux-kernel, linux-raid, x86
* Eric Biggers <ebiggers@kernel.org> wrote:
> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> > actually go through all version checks and make this is the minimum
> > for all architectures.
> >
> > Most of the actual resulting changes are actually for raising the
> > binutils version, which eliminates version checks on x86 and arm64.
> >
> > Arnd Bergmann (4):
> > kbuild: require gcc-8 and binutils-2.30
> > raid6: skip avx512 checks
> > x86: remove checks for binutils-2.30 and earlier
> > arm64: drop binutils version checks
>
> This is intended to supersede the patches from Uros that removed checks for
> binutils < 2.25, right? See:
>
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> * https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
Yeah, so these commits (now pending in the x86 tree) should nicely
complement each other, there shouldn't be much friction other than:
a72d55dc3bd6 x86/idle: Remove CONFIG_AS_TPAUSE
... which will have a conflict in arch/x86/Kconfig.assembler but is
straightforward to resolve.
> If we can indeed bump up the requirement to 2.30, that would be great.
Agreed.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
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
2 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-08 7:43 UTC (permalink / raw)
To: Eric Biggers, Arnd Bergmann
Cc: linux-kbuild, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
On Mon, Apr 7, 2025, at 18:41, Eric Biggers wrote:
> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
>
> This is intended to supersede the patches from Uros that removed checks for
> binutils < 2.25, right? See:
>
> *
> https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> *
> https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> *
> https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
I missed these, but it does sounds we easy to work out, either
by rebasing my patch or dropping Uros' version.
> If we can indeed bump up the requirement to 2.30, that would be great.
>
> Just a note though: I recently added VAES and VPCLMULQDQ instructions to
> BoringSSL, which increased the binutils requirement of building BoringSSL to
> 2.30, and this caused issues in a downstream project; e.g. see
> https://github.com/briansmith/ring/issues/2463. Specifically people complained
> about being unable to build on Amazon Linux 2 and CentOS/RHEL/Oracle Linux 7.
>
> So I just thought I'd mention that, based on past experience with this sort of
> thing, those are the specific cases where it seems people are most likely to be
> trying to use binutils < 2.30.
>
> But if those distros are not going to be supported any longer (without
> installing newer tools on them), or even are already unsupported due to the gcc
> requirement, bumping up the binutils requirement to 2.30 sounds good to me.
RHEL7 comes wit gcc-4.8.5, which is already too old to build the kernel,
so I'm not worried about it at all. RHEL8 and Debian 10 have gcc-8,
which is why that makes sense as a new minimum version.
SLES-15 (gcc-7), Debian 9 (gcc-6), and Ubuntu 18.05 (gcc-7) are the
ones that can currently build mainline kernels but are broken by this
change. SLES-15 is the only one of those that are still supported, but
they do ship with add-on compilers.
Arnd
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
2025-04-08 7:43 ` Arnd Bergmann
@ 2025-04-08 8:16 ` Ingo Molnar
0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2025-04-08 8:16 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Eric Biggers, Arnd Bergmann, linux-kbuild, H. Peter Anvin,
Ard Biesheuvel, Borislav Petkov, Brian Gerst, Catalin Marinas,
Dave Hansen, Herbert Xu, Ingo Molnar, Jonathan Corbet,
Marc Zyngier, Mark Rutland, Masahiro Yamada, Nathan Chancellor,
Nicolas Schier, Takashi Iwai, Thomas Gleixner, Uros Bizjak,
Will Deacon, linux-arm-kernel, linux-crypto, linux-doc,
linux-kernel, linux-raid, x86
* Arnd Bergmann <arnd@arndb.de> wrote:
> On Mon, Apr 7, 2025, at 18:41, Eric Biggers wrote:
> > On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> >
> > This is intended to supersede the patches from Uros that removed checks for
> > binutils < 2.25, right? See:
> >
> > *
> > https://lore.kernel.org/linux-crypto/20250404074135.520812-1-ubizjak@gmail.com/
> > *
> > https://lore.kernel.org/linux-crypto/20250404074135.520812-2-ubizjak@gmail.com
> > *
> > https://lore.kernel.org/linux-crypto/20250404074135.520812-3-ubizjak@gmail.com/
>
> I missed these, but it does sounds we easy to work out, either
> by rebasing my patch or dropping Uros' version.
It's a trivial conflict resolution AFAICS, already done in today's
-next.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] arm64: drop binutils version checks
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-08 14:05 ` Mark Rutland
1 sibling, 1 reply; 18+ messages in thread
From: Will Deacon @ 2025-04-08 8:46 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kbuild, Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel,
Borislav Petkov, Brian Gerst, Catalin Marinas, Dave Hansen,
Herbert Xu, Ingo Molnar, Jonathan Corbet, Marc Zyngier,
Mark Rutland, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Takashi Iwai, Thomas Gleixner, Uros Bizjak, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
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>
> ---
> arch/arm64/Kconfig | 37 ++-------------------------------
> arch/arm64/Makefile | 21 ++-----------------
> arch/arm64/include/asm/rwonce.h | 4 ----
> arch/arm64/kvm/Kconfig | 1 -
> arch/arm64/lib/xor-neon.c | 2 +-
> 5 files changed, 5 insertions(+), 60 deletions(-)
Since some of these checks are dynamic (i.e. they try passing various
options to the tools to see if they barf), have you checked that the
minimum supported version of clang implements them all?
Will
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] arm64: drop binutils version checks
2025-04-08 8:46 ` Will Deacon
@ 2025-04-08 13:10 ` Arnd Bergmann
2025-04-11 16:02 ` Will Deacon
0 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-08 13:10 UTC (permalink / raw)
To: Will Deacon, Arnd Bergmann
Cc: linux-kbuild, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, linux-arm-kernel, linux-crypto,
linux-doc, linux-kernel, linux-raid, x86
On Tue, Apr 8, 2025, at 10:46, Will Deacon wrote:
> 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>
>> ---
>> arch/arm64/Kconfig | 37 ++-------------------------------
>> arch/arm64/Makefile | 21 ++-----------------
>> arch/arm64/include/asm/rwonce.h | 4 ----
>> arch/arm64/kvm/Kconfig | 1 -
>> arch/arm64/lib/xor-neon.c | 2 +-
>> 5 files changed, 5 insertions(+), 60 deletions(-)
>
> Since some of these checks are dynamic (i.e. they try passing various
> options to the tools to see if they barf), have you checked that the
> minimum supported version of clang implements them all?
I did some randconfig build testing with clang-13/lld-13, since that
is the oldest supported version, and checked that the options are
all supported. I'm pretty sure it's been there for a long time before
that already.
Arnd
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] arm64: drop binutils version checks
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 14:05 ` Mark Rutland
1 sibling, 0 replies; 18+ messages in thread
From: Mark Rutland @ 2025-04-08 14:05 UTC (permalink / raw)
To: Arnd Bergmann, Will Deacon
Cc: linux-kbuild, Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel,
Borislav Petkov, Brian Gerst, Catalin Marinas, Dave Hansen,
Herbert Xu, Ingo Molnar, Jonathan Corbet, Marc Zyngier,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, linux-arm-kernel, linux-crypto,
linux-doc, linux-kernel, linux-raid, x86
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
2025-04-07 9:41 [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Arnd Bergmann
` (4 preceding siblings ...)
2025-04-07 16:41 ` [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version Eric Biggers
@ 2025-04-08 14:20 ` Mark Rutland
2025-04-08 17:16 ` Arnd Bergmann
5 siblings, 1 reply; 18+ messages in thread
From: Mark Rutland @ 2025-04-08 14:20 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kbuild, Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel,
Borislav Petkov, Brian Gerst, Catalin Marinas, Dave Hansen,
Herbert Xu, Ingo Molnar, Jonathan Corbet, Marc Zyngier,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
> actually go through all version checks and make this is the minimum
> for all architectures.
I am very much in favour of this, so for the series:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Is the aim to get this in for v6.15?
I believe this will permit a number of further cleanups for arm64, and
if it's possible to get this in for v6.15, it'd be a bit easier to start
preparing those for v6.16. No big problem if that's not the case.
Mark.
>
> Most of the actual resulting changes are actually for raising the
> binutils version, which eliminates version checks on x86 and arm64.
>
> Arnd Bergmann (4):
> kbuild: require gcc-8 and binutils-2.30
> raid6: skip avx512 checks
> x86: remove checks for binutils-2.30 and earlier
> arm64: drop binutils version checks
>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Brian Gerst <brgerst@gmail.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nicolas Schier <nicolas@fjasle.eu>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Uros Bizjak <ubizjak@gmail.com>
> Cc: Will Deacon <will@kernel.org>
> 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: x86@kernel.org
>
> Documentation/admin-guide/README.rst | 2 +-
> Documentation/kbuild/makefiles.rst | 4 +-
> Documentation/process/changes.rst | 4 +-
> .../translations/it_IT/process/changes.rst | 4 +-
> .../translations/zh_CN/admin-guide/README.rst | 2 +-
> arch/arm64/Kconfig | 37 +--------------
> arch/arm64/Makefile | 21 +--------
> arch/arm64/include/asm/rwonce.h | 4 --
> arch/arm64/kvm/Kconfig | 1 -
> arch/arm64/lib/xor-neon.c | 2 +-
> arch/um/Makefile | 4 +-
> arch/x86/Kconfig.assembler | 29 ------------
> arch/x86/crypto/Kconfig | 2 +-
> arch/x86/crypto/Makefile | 12 +++--
> arch/x86/crypto/aes-ctr-avx-x86_64.S | 2 -
> arch/x86/crypto/aes-xts-avx-x86_64.S | 2 -
> arch/x86/crypto/aesni-intel_glue.c | 21 +--------
> arch/x86/crypto/aria-aesni-avx-asm_64.S | 10 -----
> arch/x86/crypto/aria-aesni-avx2-asm_64.S | 10 +----
> arch/x86/crypto/aria_aesni_avx2_glue.c | 4 +-
> arch/x86/crypto/aria_aesni_avx_glue.c | 4 +-
> arch/x86/crypto/blake2s-core.S | 4 --
> arch/x86/crypto/blake2s-glue.c | 6 +--
> arch/x86/crypto/chacha_glue.c | 6 +--
> arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 8 ----
> arch/x86/crypto/poly1305_glue.c | 4 +-
> arch/x86/crypto/sha1_ssse3_glue.c | 10 -----
> arch/x86/crypto/sha256_ssse3_glue.c | 10 -----
> include/linux/unroll.h | 4 +-
> kernel/gcov/gcc_4_7.c | 4 --
> lib/raid6/algos.c | 6 ---
> lib/raid6/avx512.c | 4 --
> lib/raid6/recov_avx512.c | 6 ---
> lib/raid6/test/Makefile | 3 --
> lib/test_fortify/Makefile | 5 +--
> scripts/Makefile.compiler | 2 +-
> scripts/gcc-plugins/gcc-common.h | 45 -------------------
> scripts/min-tool-version.sh | 6 +--
> 38 files changed, 36 insertions(+), 278 deletions(-)
>
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/4] Make gcc-8.1 and binutils-2.30 the minimum version
2025-04-08 14:20 ` Mark Rutland
@ 2025-04-08 17:16 ` Arnd Bergmann
0 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2025-04-08 17:16 UTC (permalink / raw)
To: Mark Rutland, Arnd Bergmann
Cc: linux-kbuild, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Masahiro Yamada,
Nathan Chancellor, Nicolas Schier, Takashi Iwai, Thomas Gleixner,
Uros Bizjak, Will Deacon, linux-arm-kernel, linux-crypto,
linux-doc, linux-kernel, linux-raid, x86
On Tue, Apr 8, 2025, at 16:20, Mark Rutland wrote:
> On Mon, Apr 07, 2025 at 11:41:12AM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> x86 already requires gcc-8.1 since linux-6.15-rc1, which led me to
>> actually go through all version checks and make this is the minimum
>> for all architectures.
>
> I am very much in favour of this, so for the series:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
>
> Is the aim to get this in for v6.15?
>
> I believe this will permit a number of further cleanups for arm64, and
> if it's possible to get this in for v6.15, it'd be a bit easier to start
> preparing those for v6.16. No big problem if that's not the case.
I wasn't planning to push it for 6.15, as we've discussed this change
for a long time already, I don't think there is any rush now, though
I agree it would have helped to have it earlier.
I already found another follow-up, removing support for the sancov
gcc plugin that is no longer needed, I'm sure there is more.
Arnd
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] arm64: drop binutils version checks
2025-04-08 13:10 ` Arnd Bergmann
@ 2025-04-11 16:02 ` Will Deacon
0 siblings, 0 replies; 18+ messages in thread
From: Will Deacon @ 2025-04-11 16:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, linux-kbuild, H. Peter Anvin, Ard Biesheuvel,
Borislav Petkov, Brian Gerst, Catalin Marinas, Dave Hansen,
Herbert Xu, Ingo Molnar, Jonathan Corbet, Marc Zyngier,
Mark Rutland, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Takashi Iwai, Thomas Gleixner, Uros Bizjak, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
On Tue, Apr 08, 2025 at 03:10:57PM +0200, Arnd Bergmann wrote:
> On Tue, Apr 8, 2025, at 10:46, Will Deacon wrote:
> > 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>
> >> ---
> >> arch/arm64/Kconfig | 37 ++-------------------------------
> >> arch/arm64/Makefile | 21 ++-----------------
> >> arch/arm64/include/asm/rwonce.h | 4 ----
> >> arch/arm64/kvm/Kconfig | 1 -
> >> arch/arm64/lib/xor-neon.c | 2 +-
> >> 5 files changed, 5 insertions(+), 60 deletions(-)
> >
> > Since some of these checks are dynamic (i.e. they try passing various
> > options to the tools to see if they barf), have you checked that the
> > minimum supported version of clang implements them all?
>
> I did some randconfig build testing with clang-13/lld-13, since that
> is the oldest supported version, and checked that the options are
> all supported. I'm pretty sure it's been there for a long time before
> that already.
Thanks (especially to Mark!) for checking.
Will
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] kbuild: require gcc-8 and binutils-2.30
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
0 siblings, 1 reply; 18+ messages in thread
From: Eric Biggers @ 2025-05-15 18:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kbuild, Arnd Bergmann, H. Peter Anvin, Ard Biesheuvel,
Borislav Petkov, Brian Gerst, Catalin Marinas, Dave Hansen,
Herbert Xu, Ingo Molnar, Jonathan Corbet, Marc Zyngier,
Mark Rutland, Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
Takashi Iwai, Thomas Gleixner, Uros Bizjak, Will Deacon,
linux-arm-kernel, linux-crypto, linux-doc, linux-kernel,
linux-raid, x86
On Mon, Apr 07, 2025 at 11:41:13AM +0200, Arnd Bergmann wrote:
> diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
> index d564362773b5..41b1431f5a6b 100644
> --- a/Documentation/process/changes.rst
> +++ b/Documentation/process/changes.rst
> @@ -29,13 +29,13 @@ you probably needn't concern yourself with pcmciautils.
> ====================== =============== ========================================
> Program Minimal version Command to check the version
> ====================== =============== ========================================
> -GNU C 5.1 gcc --version
> +GNU C 8.1 gcc --version
> Clang/LLVM (optional) 13.0.1 clang --version
> Rust (optional) 1.78.0 rustc --version
> bindgen (optional) 0.65.1 bindgen --version
> GNU make 4.0 make --version
> bash 4.2 bash --version
> -binutils 2.25 ld -v
> +binutils 2.30 ld -v
> flex 2.5.35 flex --version
> bison 2.0 bison --version
> pahole 1.16 pahole --version
Later in this file, there's another mention of the binutils version that needs
to be updated. (Or maybe removed since it's redundant with the table?)
Binutils
--------
Binutils 2.25 or newer is needed to build the kernel.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] kbuild: require gcc-8 and binutils-2.30
2025-05-15 18:28 ` Eric Biggers
@ 2025-05-16 8:14 ` Arnd Bergmann
0 siblings, 0 replies; 18+ messages in thread
From: Arnd Bergmann @ 2025-05-16 8:14 UTC (permalink / raw)
To: Eric Biggers, Arnd Bergmann
Cc: linux-kbuild, H. Peter Anvin, Ard Biesheuvel, Borislav Petkov,
Brian Gerst, Catalin Marinas, Dave Hansen, Herbert Xu,
Ingo Molnar, Jonathan Corbet, Marc Zyngier, Mark Rutland,
Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Takashi Iwai,
Thomas Gleixner, Uros Bizjak, Will Deacon, linux-arm-kernel,
linux-crypto, linux-doc, linux-kernel, linux-raid, x86
On Thu, May 15, 2025, at 20:28, Eric Biggers wrote:
> On Mon, Apr 07, 2025 at 11:41:13AM +0200, Arnd Bergmann wrote:
>
> Later in this file, there's another mention of the binutils version that needs
> to be updated. (Or maybe removed since it's redundant with the table?)
>
> Binutils 2.25 or newer is needed to build the kernel.
Thanks for noticing, I've fixed both the English and Italian documentation
files now.
Arnd
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-05-16 8:16 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).