diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/acpi/cstate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index c2502eb9aa83..a4805b3b4095 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */ | |||
56 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; | 56 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; |
57 | 57 | ||
58 | #define MWAIT_SUBSTATE_MASK (0xf) | 58 | #define MWAIT_SUBSTATE_MASK (0xf) |
59 | #define MWAIT_CSTATE_MASK (0xf) | ||
59 | #define MWAIT_SUBSTATE_SIZE (4) | 60 | #define MWAIT_SUBSTATE_SIZE (4) |
60 | 61 | ||
61 | #define CPUID_MWAIT_LEAF (5) | 62 | #define CPUID_MWAIT_LEAF (5) |
@@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
98 | cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); | 99 | cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); |
99 | 100 | ||
100 | /* Check whether this particular cx_type (in CST) is supported or not */ | 101 | /* Check whether this particular cx_type (in CST) is supported or not */ |
101 | cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1; | 102 | cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) & |
103 | MWAIT_CSTATE_MASK) + 1; | ||
102 | edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE); | 104 | edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE); |
103 | num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK; | 105 | num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK; |
104 | 106 | ||