| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/4] xen/arm: do not use is_running to decide whether we can write directly to the LR registers
 On Wed, 10 Apr 2013, Ian Campbell wrote:
> > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> > index ac1f939..2d0b052 100644
> > --- a/xen/arch/arm/gic.c
> > +++ b/xen/arch/arm/gic.c
> > @@ -65,11 +65,9 @@ void gic_save_state(struct vcpu *v)
> >  {
> >      int i;
> >  
> > -    spin_lock_irq(&gic.lock);
> >      for ( i=0; i<nr_lrs; i++)
> >          v->arch.gic_lr[i] = GICH[GICH_LR + i];
> >      v->arch.lr_mask = this_cpu(lr_mask);
> > -    spin_unlock_irq(&gic.lock);
> 
> Why does this lock become unnecessary? Just because interrupts are now
> disabled around this call and it only accesses v->foo which cannot be
> accessed simultaneously on some other pCPU (e.g. one which is trying to
> inject an event to this vCPU)?
That's right.
> Would be good to describe in the changelog or perhaps a comment. Maybe
> even ASSERT(irqs_disbled())
Good idea.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |