From 2581d1fb42995d973f9fcebf96dafbd05d6d13f7 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Fri, 25 May 2012 08:18:47 +0100 Subject: [PATCH] x86/cpuidle: do not flush cache unless entering C3 Nor is there a need to disable bus master arbitration in that case. Signed-off-by: Wei Wang Modified-by: Zhang, Yang Z Signed-off-by: Jan Beulich Committed-by: Jan Beulich xen-unstable changeset: 25195:a06e6cdeafe3 xen-unstable date: Mon Apr 16 13:05:28 2012 +0200 --- tools/security/python/xensec_tools/acm_getlabel | 0 xen/arch/x86/acpi/cpu_idle.c | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 tools/security/python/xensec_tools/acm_getlabel diff --git a/tools/security/python/xensec_tools/acm_getlabel b/tools/security/python/xensec_tools/acm_getlabel old mode 100644 new mode 100755 diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 146224c044..122e7f90cb 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -483,7 +483,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() ) @@ -505,7 +507,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);