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] hpet cpuidle: Observe IRQ-safe locking pr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hpet cpuidle: Observe IRQ-safe locking protocol.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Oct 2008 10:50:13 -0700
Delivery-date: Thu, 23 Oct 2008 10:50:31 -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 1224759663 -3600
# Node ID 5bca96f74d5966ef8a3328aa4c5d44e85a7ffff4
# Parent  0358305c68830f8af398192fb0a0b0f1a2517f73
hpet cpuidle: Observe IRQ-safe locking protocol.

Otherwise, may encounter deadlock.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hpet.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 0358305c6883 -r 5bca96f74d59 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Thu Oct 23 11:53:52 2008 +0100
+++ b/xen/arch/x86/hpet.c       Thu Oct 23 12:01:03 2008 +0100
@@ -146,7 +146,7 @@ static void handle_hpet_broadcast(struct
     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 @@ again:
         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)
@@ -213,6 +213,7 @@ void hpet_broadcast_enter(void)
 {
     struct hpet_event_channel *ch = &hpet_event;
 
+    ASSERT(!local_irq_is_enabled());
     spin_lock(&ch->lock);
 
     disable_APIC_timer();

_______________________________________________
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] hpet cpuidle: Observe IRQ-safe locking protocol., Xen patchbot-unstable <=