]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/acpi/cstate.c
Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / acpi / cstate.c
index cf5ec586f22069c5bdeb3a3dee49dc77536a228b..bbbe4bbb6f34b7ed8bf60cf849faa32963e93d90 100644 (file)
@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */
 static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
 
 #define MWAIT_SUBSTATE_MASK    (0xf)
+#define MWAIT_CSTATE_MASK      (0xf)
 #define MWAIT_SUBSTATE_SIZE    (4)
 
 #define CPUID_MWAIT_LEAF (5)
@@ -78,7 +79,8 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)
        cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
 
        /* Check whether this particular cx_type (in CST) is supported or not */
-       cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1;
+       cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) &
+                       MWAIT_CSTATE_MASK) + 1;
        edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
        num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;