diff options
author | Borislav Petkov <bp@suse.de> | 2015-12-07 04:39:40 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-12-19 05:49:54 -0500 |
commit | 39c06df4dc10a41de5fe706f4378ee5f09beba73 (patch) | |
tree | 65bcafe71aa5ddbaf102b0ee1fe54fc6ccef5e3c /arch/x86/include | |
parent | 2ccd71f1b278d450a6f8c8c737c7fe237ca06dc6 (diff) |
x86/cpufeature: Cleanup get_cpu_cap()
Add an enum for the ->x86_capability array indices and cleanup
get_cpu_cap() by killing some redundant local vars.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1449481182-27541-3-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 13d78e0e6ae0..35401fef0d75 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -288,6 +288,26 @@ | |||
288 | #include <asm/asm.h> | 288 | #include <asm/asm.h> |
289 | #include <linux/bitops.h> | 289 | #include <linux/bitops.h> |
290 | 290 | ||
291 | enum cpuid_leafs | ||
292 | { | ||
293 | CPUID_1_EDX = 0, | ||
294 | CPUID_8000_0001_EDX, | ||
295 | CPUID_8086_0001_EDX, | ||
296 | CPUID_LNX_1, | ||
297 | CPUID_1_ECX, | ||
298 | CPUID_C000_0001_EDX, | ||
299 | CPUID_8000_0001_ECX, | ||
300 | CPUID_LNX_2, | ||
301 | CPUID_LNX_3, | ||
302 | CPUID_7_0_EBX, | ||
303 | CPUID_D_1_EAX, | ||
304 | CPUID_F_0_EDX, | ||
305 | CPUID_F_1_EDX, | ||
306 | CPUID_8000_0008_EBX, | ||
307 | CPUID_6_EAX, | ||
308 | CPUID_8000_000A_EDX, | ||
309 | }; | ||
310 | |||
291 | #ifdef CONFIG_X86_FEATURE_NAMES | 311 | #ifdef CONFIG_X86_FEATURE_NAMES |
292 | extern const char * const x86_cap_flags[NCAPINTS*32]; | 312 | extern const char * const x86_cap_flags[NCAPINTS*32]; |
293 | extern const char * const x86_power_flags[32]; | 313 | extern const char * const x86_power_flags[32]; |