[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 06/21] xen/arm: segregate and split GIC low level functionality
On Thu, 12 Jun 2014, vijay.kilari@xxxxxxxxx wrote: > From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> > > GIC driver contains both generic and hardware specific low > level functionality in gic.c file. > > With this patch, low level functionality is moved to separate > file gic-v2.c and generic code is kept in gic.c file > > Callbacks are registered by low level driver with generic driver > and are called whereever required. > > The locking mechanism is not changed. > > This helps to separate generic and hardware functionality > and implement future hardware version drivers. > > Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> [...] > +static void gicv2_irq_enable(struct irq_desc *desc) > +{ > + unsigned long flags; > + int irq = desc->irq; > + > + spin_lock_irqsave(&gicv2.lock, flags); > + desc->status &= ~IRQ_DISABLED; > + dsb(sy); > + /* Enable routing */ > + writel_relaxed((1u << (irq % 32)), GICD + GICD_ISENABLER + (irq / 32) * > 4); > + spin_unlock_irqrestore(&gicv2.lock, flags); > +} > + > +static void gicv2_irq_disable(struct irq_desc *desc) > +{ > + unsigned long flags; > + int irq = desc->irq; > + > + spin_lock_irqsave(&gicv2.lock, flags); > + /* Disable routing */ > + writel_relaxed(1u << (irq % 32), GICD + GICD_ICENABLER + (irq / 32) * 4); > + desc->status |= IRQ_DISABLED; > + spin_unlock_irqrestore(&gicv2.lock, flags); > +} That's better: same locking as before. At this point you should keep the: ASSERT(spin_is_locked(&desc->lock)); that we currently have. With that change: Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |