diff options
Diffstat (limited to 'include/asm-x86/cpufeature.h')
-rw-r--r-- | include/asm-x86/cpufeature.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h index 065e92966c7c..0d609c837a41 100644 --- a/include/asm-x86/cpufeature.h +++ b/include/asm-x86/cpufeature.h | |||
@@ -120,6 +120,9 @@ | |||
120 | extern const char * const x86_cap_flags[NCAPINTS*32]; | 120 | extern const char * const x86_cap_flags[NCAPINTS*32]; |
121 | extern const char * const x86_power_flags[32]; | 121 | extern const char * const x86_power_flags[32]; |
122 | 122 | ||
123 | #define test_cpu_cap(c, bit) \ | ||
124 | test_bit(bit, (unsigned long *)((c)->x86_capability)) | ||
125 | |||
123 | #define cpu_has(c, bit) \ | 126 | #define cpu_has(c, bit) \ |
124 | (__builtin_constant_p(bit) && \ | 127 | (__builtin_constant_p(bit) && \ |
125 | ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || \ | 128 | ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || \ |
@@ -131,7 +134,8 @@ extern const char * const x86_power_flags[32]; | |||
131 | (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) || \ | 134 | (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) || \ |
132 | (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) ) \ | 135 | (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) ) \ |
133 | ? 1 : \ | 136 | ? 1 : \ |
134 | test_bit(bit, (unsigned long *)((c)->x86_capability))) | 137 | test_cpu_cap(c, bit)) |
138 | |||
135 | #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) | 139 | #define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit) |
136 | 140 | ||
137 | #define set_cpu_cap(c, bit) set_bit(bit, (unsigned long *)((c)->x86_capability)) | 141 | #define set_cpu_cap(c, bit) set_bit(bit, (unsigned long *)((c)->x86_capability)) |
@@ -181,6 +185,8 @@ extern const char * const x86_power_flags[32]; | |||
181 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) | 185 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) |
182 | #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) | 186 | #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) |
183 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) | 187 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) |
188 | #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) | ||
189 | #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) | ||
184 | 190 | ||
185 | #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) | 191 | #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) |
186 | # define cpu_has_invlpg 1 | 192 | # define cpu_has_invlpg 1 |