]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/cpufeatures: Rename X86_CMPXCHG64 to X86_CX8
authorH. Peter Anvin (Intel) <hpa@zytor.com>
Fri, 28 Feb 2025 08:23:34 +0000 (00:23 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 28 Feb 2025 10:42:34 +0000 (11:42 +0100)
Replace X86_CMPXCHG64 with X86_CX8, as CX8 is the name of the CPUID
flag, thus to make it consistent with X86_FEATURE_CX8 defined in
<asm/cpufeatures.h>.

No functional change intended.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Xin Li (Intel) <xin@zytor.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250228082338.73859-2-xin@zytor.com
arch/x86/Kconfig
arch/x86/Kconfig.cpu
arch/x86/include/asm/asm-prototypes.h
arch/x86/include/asm/atomic64_32.h
arch/x86/include/asm/cmpxchg_32.h
arch/x86/include/asm/required-features.h
arch/x86/lib/Makefile
arch/x86/lib/cmpxchg8b_emu.S
lib/atomic64_test.c
tools/arch/x86/include/asm/required-features.h

index aa90f0355be110213ecc519ea5a6c794825ccd6b..017035f461cf244b545028a17ce35114dda9417b 100644 (file)
@@ -133,7 +133,7 @@ config X86
        select ARCH_SUPPORTS_AUTOFDO_CLANG
        select ARCH_SUPPORTS_PROPELLER_CLANG    if X86_64
        select ARCH_USE_BUILTIN_BSWAP
-       select ARCH_USE_CMPXCHG_LOCKREF         if X86_CMPXCHG64
+       select ARCH_USE_CMPXCHG_LOCKREF         if X86_CX8
        select ARCH_USE_MEMTEST
        select ARCH_USE_QUEUED_RWLOCKS
        select ARCH_USE_QUEUED_SPINLOCKS
index 8fcb8ccee44b25d754b429226315493cffb43a46..f8b3296fe2e1dac15ce83f05431d2ec82a7dfdbd 100644 (file)
@@ -299,7 +299,7 @@ config X86_HAVE_PAE
        def_bool y
        depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC7 || MATOM || X86_64
 
-config X86_CMPXCHG64
+config X86_CX8
        def_bool y
        depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7 || MGEODEGX1 || MGEODE_LX
 
@@ -313,7 +313,7 @@ config X86_MINIMUM_CPU_FAMILY
        int
        default "64" if X86_64
        default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MK7)
-       default "5" if X86_32 && X86_CMPXCHG64
+       default "5" if X86_32 && X86_CX8
        default "4"
 
 config X86_DEBUGCTLMSR
index 3674006e39744ee028df3dc051865733c16ba004..8d9e62725202eb76cd746c79d48be6202cb09140 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/gsseg.h>
 #include <asm/nospec-branch.h>
 
-#ifndef CONFIG_X86_CMPXCHG64
+#ifndef CONFIG_X86_CX8
 extern void cmpxchg8b_emu(void);
 #endif
 
index 6c6e9b9f98a4563da8a6cb5676c60618c7f77e2d..797085ecaaa45eae93cede33531d2ccd6077107a 100644 (file)
@@ -48,7 +48,7 @@ static __always_inline s64 arch_atomic64_read_nonatomic(const atomic64_t *v)
        ATOMIC64_EXPORT(atomic64_##sym)
 #endif
 
-#ifdef CONFIG_X86_CMPXCHG64
+#ifdef CONFIG_X86_CX8
 #define __alternative_atomic64(f, g, out, in...) \
        asm volatile("call %c[func]" \
                     : ALT_OUTPUT_SP(out) \
index fd1282a783ddbff9ba9fa77d7cb9c2351865020c..c38d4ed94cb34051b0bd380198f9b48d3f5a56d1 100644 (file)
@@ -69,7 +69,7 @@ static __always_inline bool __try_cmpxchg64_local(volatile u64 *ptr, u64 *oldp,
        return __arch_try_cmpxchg64(ptr, oldp, new,);
 }
 
-#ifdef CONFIG_X86_CMPXCHG64
+#ifdef CONFIG_X86_CX8
 
 #define arch_cmpxchg64 __cmpxchg64
 
index e9187ddd3d1fdc61fff087b0ea3b8b9b0ff33ac3..0068133cb622fcc0057844873508e66b12961878 100644 (file)
@@ -23,7 +23,7 @@
 # define NEED_PAE      0
 #endif
 
-#ifdef CONFIG_X86_CMPXCHG64
+#ifdef CONFIG_X86_CX8
 # define NEED_CX8      (1<<(X86_FEATURE_CX8 & 31))
 #else
 # define NEED_CX8      0
index 8a59c61624c2f3f3580fce8231da86393241e7e9..9bbe2819881fbe615ea5081cb3e4eca94c0c9123 100644 (file)
@@ -56,7 +56,7 @@ ifeq ($(CONFIG_X86_32),y)
         lib-y += string_32.o
         lib-y += memmove_32.o
         lib-y += cmpxchg8b_emu.o
-ifneq ($(CONFIG_X86_CMPXCHG64),y)
+ifneq ($(CONFIG_X86_CX8),y)
         lib-y += atomic64_386_32.o
 endif
 else
index 1c96be769adc3e98c87d63dc623ed21cf770129b..d4bb24347ff818b1f5532a740a66afcdae3a9f7c 100644 (file)
@@ -7,7 +7,7 @@
 
 .text
 
-#ifndef CONFIG_X86_CMPXCHG64
+#ifndef CONFIG_X86_CX8
 
 /*
  * Emulate 'cmpxchg8b (%esi)' on UP
index 759ea1783cc59bc6464c5a6c5902d3db85873c3f..d726068358c7de107f9f40e36826672107ba7c6f 100644 (file)
@@ -254,7 +254,7 @@ static __init int test_atomics_init(void)
        pr_info("passed for %s platform %s CX8 and %s SSE\n",
 #ifdef CONFIG_X86_64
                "x86-64",
-#elif defined(CONFIG_X86_CMPXCHG64)
+#elif defined(CONFIG_X86_CX8)
                "i586+",
 #else
                "i386+",
index e9187ddd3d1fdc61fff087b0ea3b8b9b0ff33ac3..0068133cb622fcc0057844873508e66b12961878 100644 (file)
@@ -23,7 +23,7 @@
 # define NEED_PAE      0
 #endif
 
-#ifdef CONFIG_X86_CMPXCHG64
+#ifdef CONFIG_X86_CX8
 # define NEED_CX8      (1<<(X86_FEATURE_CX8 & 31))
 #else
 # define NEED_CX8      0