]> xenbits.xensource.com Git - xen.git/commitdiff
x86/cpuidle: do not flush cache unless entering C3
authorWei Wang <wei.wang2@amd.com>
Mon, 16 Apr 2012 11:05:28 +0000 (13:05 +0200)
committerWei Wang <wei.wang2@amd.com>
Mon, 16 Apr 2012 11:05:28 +0000 (13:05 +0200)
Nor is there a need to disable bus master arbitration in that case.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
Modified-by: Zhang, Yang Z <yang.z.zhang@intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/cpu_idle.c

index 6ff4711f7c3ef07ea4db0042fc36e053f5300017..4afd71b4458ac80f36c8e5193b24c958603f593a 100644 (file)
@@ -493,7 +493,9 @@ static void acpi_processor_idle(void)
          * not set. In that case we cannot do much, we enter C3
          * without doing anything.
          */
-        if ( power->flags.bm_check && power->flags.bm_control )
+        if ( cx->type != ACPI_STATE_C3 )
+            /* nothing to be done here */;
+        else if ( power->flags.bm_check && power->flags.bm_control )
         {
             spin_lock(&c3_cpu_status.lock);
             if ( ++c3_cpu_status.count == num_online_cpus() )
@@ -515,7 +517,8 @@ static void acpi_processor_idle(void)
         /* Invoke C3 */
         acpi_idle_do_entry(cx);
 
-        if ( power->flags.bm_check && power->flags.bm_control )
+        if ( (cx->type == ACPI_STATE_C3) &&
+             power->flags.bm_check && power->flags.bm_control )
         {
             /* Enable bus master arbitration */
             spin_lock(&c3_cpu_status.lock);