diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-02-04 10:48:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-04 10:48:00 -0500 |
commit | fa1408e4df53ec1e61f59c030b3488a1ef0c635d (patch) | |
tree | 603c35ffc04a8b716f1b0c65fc136f63414134c4 /include/asm-x86 | |
parent | 84fb144b928744cea8eb39bb4fbc794fcb749175 (diff) |
x86: unify CPU feature string names
Move the CPU feature string names to a separate file (common to 32
and 64 bits); additionally, make <asm/cpufeature.h> includable by host
code in preparation for including the CPU feature strings in the boot
code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/cpufeature.h | 12 |
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 | |||
119 | extern const char * const x86_cap_flags[NCAPINTS*32]; | ||
120 | extern 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 */ |