[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xen/arm: gic and vgic fixes
# HG changeset patch # User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> # Date 1342542810 -3600 # Node ID 99941375ef10b602b2e8784de70b0a294d832497 # Parent 9f5fc2a5471f897eacb24b710c5c1e5e5ab6a980 xen/arm: gic and vgic fixes - the last argument of find_next_bit is the maximum number of bits, not the maximum number of bytes; - use list_for_each_entry_safe instead of list_for_each_entry in gic_restore_pending_irqs because we are actually deleting entries in the loop. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 9f5fc2a5471f -r 99941375ef10 xen/arch/arm/gic.c --- a/xen/arch/arm/gic.c Tue Jul 17 17:33:29 2012 +0100 +++ b/xen/arch/arm/gic.c Tue Jul 17 17:33:30 2012 +0100 @@ -477,9 +477,9 @@ out: static void gic_restore_pending_irqs(struct vcpu *v) { int i; - struct pending_irq *p; + struct pending_irq *p, *t; - list_for_each_entry ( p, &v->arch.vgic.lr_pending, lr_queue ) + list_for_each_entry_safe ( p, t, &v->arch.vgic.lr_pending, lr_queue ) { i = find_first_zero_bit(&gic.lr_mask, nr_lrs); if ( i >= nr_lrs ) return; @@ -583,7 +583,7 @@ static void events_maintenance(struct vc if (!already_pending && gic.event_mask != 0) { spin_lock_irq(&gic.lock); while ((i = find_next_bit((const long unsigned int *) &gic.event_mask, - sizeof(uint64_t), i)) < sizeof(uint64_t)) { + 64, i)) < 64) { GICH[GICH_LR + i] = 0; clear_bit(i, &gic.lr_mask); @@ -605,7 +605,7 @@ static void maintenance_interrupt(int ir events_maintenance(v); while ((i = find_next_bit((const long unsigned int *) &eisr, - sizeof(eisr), i)) < sizeof(eisr)) { + 64, i)) < 64) { struct pending_irq *p; spin_lock_irq(&gic.lock); diff -r 9f5fc2a5471f -r 99941375ef10 xen/arch/arm/vgic.c --- a/xen/arch/arm/vgic.c Tue Jul 17 17:33:29 2012 +0100 +++ b/xen/arch/arm/vgic.c Tue Jul 17 17:33:30 2012 +0100 @@ -355,8 +355,7 @@ static void vgic_enable_irqs(struct vcpu unsigned int irq; int i = 0; - while ( (i = find_next_bit((const long unsigned int *) &r, - sizeof(uint32_t), i)) < sizeof(uint32_t) ) { + while ( (i = find_next_bit((const long unsigned int *) &r, 32, i)) < 32 ) { irq = i + (32 * n); p = irq_to_pending(v, irq); if ( !list_empty(&p->inflight) ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |