[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



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.

Cheers,

--
Julien Grall

_______________________________________________
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®.