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

Re: [Xen-devel] [PATCH 01/11] xen/arm: vpl011: Add pl011 uart emulation in Xen



On Sun, Mar 05, 2017 at 01:04:54AM +0000, Julien Grall wrote:
> Hi Konrad,
> 
> On 03/03/2017 07:59 PM, Konrad Rzeszutek Wilk wrote:
> > > +}
> > > +
> > > +static int vpl011_data_avail(struct domain *d)
> > > +{
> > > +    int rc=0;
> > > +    unsigned long flags;
> > > +
> > > +    struct console_interface *intf=(struct console_interface 
> > > *)d->arch.vpl011.ring_buf;
> > 
> > Can you have an macro for this?
> > > +
> > > +    VPL011_LOCK(d, flags);
> > 
> > Please don't. Just use normal spin_lock invocation.
> 
> This is really a matter of taste. We've been using macro on the vgic
> emulation for the lock and I find it clearer and less error-prone. At least
> you are sure that all critical paths protected by the local will have IRQ
> disable.

OK. I am more of the other way, but then I can see the beaty of having
an macro that requires two parameters so there is no way to mess this
up.

Bhupinder, please ignore my request.

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

 


Rackspace

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