[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: Fix possible S3 suspend hangs



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1268659058 0
# Node ID bce90bb3ce2cfdb61479f33b4d55cea1060010eb
# Parent  9300248eaad2f82f997c06ae7305b50c85298751
x86: Fix possible S3 suspend hangs

It is possible for cpu to become offlined before irq disabled in idle
loop, which will cause this cpu stay in C state and can't wakeup to
play dead.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
Signed-off-by: Yu Ke <ke.yu@xxxxxxxxx>
---
 xen/arch/x86/acpi/cpu_idle.c |    3 ++-
 xen/arch/x86/domain.c        |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -r 9300248eaad2 -r bce90bb3ce2c xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c      Mon Mar 15 13:16:35 2010 +0000
+++ b/xen/arch/x86/acpi/cpu_idle.c      Mon Mar 15 13:17:38 2010 +0000
@@ -268,7 +268,8 @@ static void acpi_processor_idle(void)
      */
     local_irq_disable();
 
-    if ( softirq_pending(smp_processor_id()) )
+    if ( softirq_pending(smp_processor_id()) ||
+         cpu_is_offline(smp_processor_id()) )
     {
         local_irq_enable();
         sched_tick_resume();
diff -r 9300248eaad2 -r bce90bb3ce2c xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Mon Mar 15 13:16:35 2010 +0000
+++ b/xen/arch/x86/domain.c     Mon Mar 15 13:17:38 2010 +0000
@@ -82,7 +82,8 @@ static void default_idle(void)
 static void default_idle(void)
 {
     local_irq_disable();
-    if ( !softirq_pending(smp_processor_id()) )
+    if ( !softirq_pending(smp_processor_id()) &&
+         cpu_online(smp_processor_id()) )
         safe_halt();
     else
         local_irq_enable();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.