From: "Jan Beulich" Subject: [PATCH] x86/cpuidle: don't count C1 multiple times Date: Mon, 24 Nov 2014 11:47:28 +0000 Message-ID: <547328E0020000780004A4A1@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part95A0BFC0.0__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xss7B-0001ns-06 for xen-devel@lists.xenproject.org; Mon, 24 Nov 2014 11:47:33 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part95A0BFC0.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -1015,7 +1015,7 @@ static void set_cx( cx->target_residency =3D cx->latency * latency_factor; =20 smp_wmb(); - acpi_power->count++; + acpi_power->count +=3D (cx->type !=3D ACPI_STATE_C1); if ( cx->type =3D=3D ACPI_STATE_C1 || cx->type =3D=3D ACPI_STATE_C2 ) acpi_power->safe_state =3D cx; } --=__Part95A0BFC0.0__= Content-Type: text/plain; name="x86-count-C1-once.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-count-C1-once.patch" x86/cpuidle: don't count C1 multiple times=0A=0ACommit 4ca6f9f0 ("x86/cpuid= le: publish new states only after fully=0Ainitializing them") resulted in = the state counter to be incremented=0Afor C1 despite that using a fixed = table entry (and the statically=0Ainitialized counter value already = accounting for it and C0).=0A=0ASigned-off-by: Jan Beulich =0A=0A--- a/xen/arch/x86/acpi/cpu_idle.c=0A+++ b/xen/arch/x86/acpi/cpu_i= dle.c=0A@@ -1015,7 +1015,7 @@ static void set_cx(=0A cx->target_residen= cy =3D cx->latency * latency_factor;=0A =0A smp_wmb();=0A- = acpi_power->count++;=0A+ acpi_power->count +=3D (cx->type !=3D = ACPI_STATE_C1);=0A if ( cx->type =3D=3D ACPI_STATE_C1 || cx->type = =3D=3D ACPI_STATE_C2 )=0A acpi_power->safe_state =3D cx;=0A }=0A --=__Part95A0BFC0.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part95A0BFC0.0__=--