diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-18 19:09:42 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-08-18 19:09:42 -0700 |
| commit | 5808ac188949d7b49ed9e51f1ffcd096cac57006 (patch) | |
| tree | 6a2a5d5b58e5bfce7a36abe098a26641bcedcd07 /arch/um | |
| parent | bbd0571269b5a17bb0685fc30ea0b89b950801f5 (diff) | |
| parent | 6cc3a72caa6eb118c38f887d4608b9adb80e90e8 (diff) | |
| download | linux-5808ac188949d7b49ed9e51f1ffcd096cac57006.tar.gz linux-5808ac188949d7b49ed9e51f1ffcd096cac57006.zip | |
Merge tag 'x86_cpu_for_v7.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cpuid updates from Borislav Petkov:
- Get rid of static_cpu_has() - one less API to care about testing CPU
features
- Unify the handling of CPU core types (performance, efficient, etc) by
mapping the vendor-specific types to Linux ones
- Continuation of the work of Ahmed Darwish to centralize CPUID leaf
representation
* tag 'x86_cpu_for_v7.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/CPU: Rename struct cpuid_read_output to struct cpuid_output
x86/cpu/scattered: Sort it properly
x86/cpu: Use parsed CPUID(0x1)
x86/lib: Add CPUID(0x1) family and model calculation
x86/cpu: Use parsed CPUID(0x0)
x86/cpu/transmeta: Rescan CPUID(0x1) after modifying capabilities
x86/topology: Add TOPO_CPU_TYPE_LOW_POWER
x86/topology: Name the AMD core-type values
x86/topo: Map vendor CPU types to generic Linux such types
x86/bugs: Don't use cpu-type matching in cpu_vuln_blacklist
x86/cpu: Hide and rename static_cpu_has()
Diffstat (limited to 'arch/um')
| -rw-r--r-- | arch/um/include/asm/cpufeature.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/um/include/asm/cpufeature.h b/arch/um/include/asm/cpufeature.h index 4354f6984271..f7770083c0a4 100644 --- a/arch/um/include/asm/cpufeature.h +++ b/arch/um/include/asm/cpufeature.h @@ -49,7 +49,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; * is not relevant. */ #define cpu_feature_enabled(bit) \ - (__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : static_cpu_has(bit)) + (__builtin_constant_p(bit) && DISABLED_MASK_BIT_SET(bit) ? 0 : _static_cpu_has(bit)) #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) @@ -64,15 +64,7 @@ extern void setup_clear_cpu_cap(unsigned int bit); #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit) -/* - * Static testing of CPU features. Used the same as boot_cpu_has(). It - * statically patches the target code for additional performance. Use - * static_cpu_has() only in fast paths, where every cycle counts. Which - * means that the boot_cpu_has() variant is already fast enough for the - * majority of cases and you should stick to using it as it is generally - * only two instructions: a RIP-relative MOV and a TEST. - */ -static __always_inline bool _static_cpu_has(u16 bit) +static __always_inline bool __static_cpu_has(u16 bit) { asm goto("1: jmp 6f\n" "2:\n" @@ -116,7 +108,7 @@ t_no: return false; } -#define static_cpu_has(bit) \ +#define _static_cpu_has(bit) \ ( \ __builtin_constant_p(boot_cpu_has(bit)) ? \ boot_cpu_has(bit) : \ @@ -126,7 +118,7 @@ t_no: #define cpu_has_bug(c, bit) cpu_has(c, (bit)) #define set_cpu_bug(c, bit) set_cpu_cap(c, (bit)) -#define static_cpu_has_bug(bit) static_cpu_has((bit)) +#define static_cpu_has_bug(bit) _static_cpu_has((bit)) #define boot_cpu_has_bug(bit) cpu_has_bug(&boot_cpu_data, (bit)) #define boot_cpu_set_bug(bit) set_cpu_cap(&boot_cpu_data, (bit)) |
