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-devel

[Xen-devel] [PATCH] CPUIDLE: always get lock while irq disabled

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] CPUIDLE: always get lock while irq disabled
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Thu, 23 Oct 2008 18:30:49 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 23 Oct 2008 03:31:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack0+mqoIkUbHJzHQJa4M5849Ttr9w==
Thread-topic: [PATCH] CPUIDLE: always get lock while irq disabled
CPUIDLE: always get lock while irq disabled

Otherwise, may encounter deadlock.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>

diff -r d2f7243fc571 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Tue Oct 21 18:00:21 2008 +0100
+++ b/xen/arch/x86/hpet.c       Wed Oct 22 19:05:42 2008 +0800
@@ -146,7 +146,7 @@
     s_time_t now, next_event;
     int cpu;

-    spin_lock(&ch->lock);
+    spin_lock_irq(&ch->lock);

 again:
     ch->next_event = STIME_MAX;
@@ -171,7 +171,7 @@
         if ( reprogram_hpet_evt_channel(ch, next_event, now, 0) )
             goto again;
     }
-    spin_unlock(&ch->lock);
+    spin_unlock_irq(&ch->lock);
 }

 void hpet_broadcast_init(void)

Attachment: cpuidle_spinlock_after_disable_irq.patch
Description: cpuidle_spinlock_after_disable_irq.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] CPUIDLE: always get lock while irq disabled, Wei, Gang <=