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

[Xen-devel] [PATCH 1/7] xen/arm: /spin_lock_irq/spin_lock_irqsave in gic_set_guest_irq



gic_set_guest_irq can be called with irq disabled

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen/arch/arm/gic.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 165287c..7627ad8 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -477,8 +477,9 @@ void gic_set_guest_irq(struct vcpu *v, unsigned int 
virtual_irq,
 {
     int i;
     struct pending_irq *iter, *n;
+    unsigned long flags;
 
-    spin_lock_irq(&gic.lock);
+    spin_lock_irqsave(&gic.lock, flags);
 
     if ( v->is_running && list_empty(&v->arch.vgic.lr_pending) )
     {
@@ -505,7 +506,7 @@ void gic_set_guest_irq(struct vcpu *v, unsigned int 
virtual_irq,
     list_add_tail(&n->lr_queue, &v->arch.vgic.lr_pending);
 
 out:
-    spin_unlock_irq(&gic.lock);
+    spin_unlock_irqrestore(&gic.lock, flags);
     return;
 }
 
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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