From 625550282c299d6607eb4bdb35b3ebadb5ae77b3 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Mon, 16 Apr 2012 13:05:28 +0200 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/arch/x86/acpi/cpu_idle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 6ff4711f7c..4afd71b445 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -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); -- 2.39.5