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>
This commit is contained in:

committed by
Thomas Gleixner

parent
2ccd71f1b2
commit
39c06df4dc
@@ -288,6 +288,26 @@
|
||||
#include <asm/asm.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
enum cpuid_leafs
|
||||
{
|
||||
CPUID_1_EDX = 0,
|
||||
CPUID_8000_0001_EDX,
|
||||
CPUID_8086_0001_EDX,
|
||||
CPUID_LNX_1,
|
||||
CPUID_1_ECX,
|
||||
CPUID_C000_0001_EDX,
|
||||
CPUID_8000_0001_ECX,
|
||||
CPUID_LNX_2,
|
||||
CPUID_LNX_3,
|
||||
CPUID_7_0_EBX,
|
||||
CPUID_D_1_EAX,
|
||||
CPUID_F_0_EDX,
|
||||
CPUID_F_1_EDX,
|
||||
CPUID_8000_0008_EBX,
|
||||
CPUID_6_EAX,
|
||||
CPUID_8000_000A_EDX,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_X86_FEATURE_NAMES
|
||||
extern const char * const x86_cap_flags[NCAPINTS*32];
|
||||
extern const char * const x86_power_flags[32];
|
||||
|
Reference in New Issue
Block a user