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

[Xen-devel] [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

 


Rackspace

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