From 8ac8f6422bcbe173fc8bb79efb0287e60ce7e3c5 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Sun, 4 Jan 2009 12:04:21 +0800 Subject: [PATCH] --- yaml --- r: 128085 b: refs/heads/master c: 13b40a1a065824d2d4e55c8b48ea9f3f9d162929 h: refs/heads/master i: 128083: 9345872d28320dd58e25f238c5d6d1bbe96e9112 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/acpi/cstate.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index f220802e1975..d9bbd646f347 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9e6dada9d255497127251c03aaa59296d186f959 +refs/heads/master: 13b40a1a065824d2d4e55c8b48ea9f3f9d162929 diff --git a/trunk/arch/x86/kernel/acpi/cstate.c b/trunk/arch/x86/kernel/acpi/cstate.c index c2502eb9aa83..a4805b3b4095 100644 --- a/trunk/arch/x86/kernel/acpi/cstate.c +++ b/trunk/arch/x86/kernel/acpi/cstate.c @@ -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) @@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, 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;