WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix possible S3 suspend hangs
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Mar 2010 06:35:11 -0700
Delivery-date: Mon, 15 Mar 2010 06:35:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Fix possible S3 suspend hangs, Xen patchbot-unstable <=