[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] arm: gic.lock can be taken in interrupt context, so lock appropriately.
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1341309148 -3600 # Node ID 126681c08a6274e07861c455cf7d59d107b78296 # Parent 94984e45e189479c2bc7abb703044d2a5c9bf965 arm: gic.lock can be taken in interrupt context, so lock appropriately. In particular it is taken by gic_set_guest_irq which is called by vgic_vcpu_inject_irq Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 94984e45e189 -r 126681c08a62 xen/arch/arm/gic.c --- a/xen/arch/arm/gic.c Tue Jul 03 10:52:27 2012 +0100 +++ b/xen/arch/arm/gic.c Tue Jul 03 10:52:28 2012 +0100 @@ -329,19 +329,19 @@ int __init gic_init(void) /* Set up the per-CPU parts of the GIC for a secondary CPU */ void __cpuinit gic_init_secondary_cpu(void) { - spin_lock(&gic.lock); + spin_lock_irq(&gic.lock); gic_cpu_init(); gic_hyp_init(); - spin_unlock(&gic.lock); + spin_unlock_irq(&gic.lock); } /* Shut down the per-CPU GIC interface */ void gic_disable_cpu(void) { - spin_lock(&gic.lock); + spin_lock_irq(&gic.lock); gic_cpu_disable(); gic_hyp_disable(); - spin_unlock(&gic.lock); + spin_unlock_irq(&gic.lock); } void gic_route_irqs(void) @@ -439,7 +439,7 @@ void gic_set_guest_irq(unsigned int virt events_maintenance(current); - spin_lock(&gic.lock); + spin_lock_irq(&gic.lock); if ( list_empty(&gic.lr_pending) ) { @@ -465,7 +465,7 @@ void gic_set_guest_irq(unsigned int virt list_add_tail(&n->lr_queue, &gic.lr_pending); out: - spin_unlock(&gic.lock); + spin_unlock_irq(&gic.lock); return; } @@ -557,7 +557,7 @@ static void events_maintenance(struct vc (unsigned long *)&vcpu_info(v, evtchn_upcall_pending)); if (!already_pending && gic.event_mask != 0) { - spin_lock(&gic.lock); + spin_lock_irq(&gic.lock); while ((i = find_next_bit((const long unsigned int *) &gic.event_mask, sizeof(uint64_t), i)) < sizeof(uint64_t)) { @@ -567,7 +567,7 @@ static void events_maintenance(struct vc i++; } - spin_unlock(&gic.lock); + spin_unlock_irq(&gic.lock); } } @@ -583,7 +583,7 @@ static void maintenance_interrupt(int ir sizeof(eisr), i)) < sizeof(eisr)) { struct pending_irq *p; - spin_lock(&gic.lock); + spin_lock_irq(&gic.lock); lr = GICH[GICH_LR + i]; virq = lr & GICH_LR_VIRTUAL_MASK; GICH[GICH_LR + i] = 0; @@ -599,7 +599,7 @@ static void maintenance_interrupt(int ir } else { gic_inject_irq_stop(); } - spin_unlock(&gic.lock); + spin_unlock_irq(&gic.lock); spin_lock_irq(¤t->arch.vgic.lock); p = irq_to_pending(current, virq); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |