]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/cpuidle: don't count C1 multiple times
authorJan Beulich <jbeulich@suse.com>
Tue, 25 Nov 2014 09:05:29 +0000 (10:05 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Nov 2014 09:05:29 +0000 (10:05 +0100)
Commit 4ca6f9f0 ("x86/cpuidle: publish new states only after fully
initializing them") resulted in the state counter to be incremented
for C1 despite that using a fixed table entry (and the statically
initialized counter value already accounting for it and C0).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/acpi/cpu_idle.c

index f72719c17068af327666cf1fa7089b47433bc0bd..2b2bcc6361308804a9ccf110ff7c34a96929f3bf 100644 (file)
@@ -1000,7 +1000,7 @@ static void set_cx(
     cx->target_residency = cx->latency * latency_factor;
 
     smp_wmb();
-    acpi_power->count++;
+    acpi_power->count += (cx->type != ACPI_STATE_C1);
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
         acpi_power->safe_state = cx;
 }