aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/cpufeature.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h
index e66d004aa651..20e849ae6ddc 100644
--- a/include/asm-i386/cpufeature.h
+++ b/include/asm-i386/cpufeature.h
@@ -106,8 +106,12 @@
106#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ 106#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
107#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ 107#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
108 108
109#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) 109#define cpu_has(c, bit) \
110#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) 110 ((__builtin_constant_p(bit) && (bit) < 32 && \
111 (1UL << (bit)) & REQUIRED_MASK1) ? \
112 1 : \
113 test_bit(bit, (c)->x86_capability))
114#define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit)
111 115
112#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) 116#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
113#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME) 117#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME)