aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/cpufeature.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/cpufeature.h')
-rw-r--r--include/asm-x86/cpufeature.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
index 3fb7dfa7fc91..3adc9cf0f391 100644
--- a/include/asm-x86/cpufeature.h
+++ b/include/asm-x86/cpufeature.h
@@ -4,9 +4,6 @@
4#ifndef _ASM_X86_CPUFEATURE_H 4#ifndef _ASM_X86_CPUFEATURE_H
5#define _ASM_X86_CPUFEATURE_H 5#define _ASM_X86_CPUFEATURE_H
6 6
7#ifndef __ASSEMBLY__
8#include <linux/bitops.h>
9#endif
10#include <asm/required-features.h> 7#include <asm/required-features.h>
11 8
12#define NCAPINTS 8 /* N 32-bit words worth of info */ 9#define NCAPINTS 8 /* N 32-bit words worth of info */
@@ -115,6 +112,13 @@
115 */ 112 */
116#define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */ 113#define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */
117 114
115#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
116
117#include <linux/bitops.h>
118
119extern const char * const x86_cap_flags[NCAPINTS*32];
120extern const char * const x86_power_flags[32];
121
118#define cpu_has(c, bit) \ 122#define cpu_has(c, bit) \
119 (__builtin_constant_p(bit) && \ 123 (__builtin_constant_p(bit) && \
120 ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || \ 124 ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || \
@@ -204,4 +208,6 @@
204 208
205#endif /* CONFIG_X86_64 */ 209#endif /* CONFIG_X86_64 */
206 210
211#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
212
207#endif /* _ASM_X86_CPUFEATURE_H */ 213#endif /* _ASM_X86_CPUFEATURE_H */