Hi Keir, I''m having trouble with the serial locking patch from a couple
weeks ago, specifically serial_getc():
spin_lock_irqsave(&port->lock, flags);
...
if ( port->driver->getc(port, &c) )
break;
spin_unlock_irqrestore(&port->lock, flags);
That leaves port->lock locked, as soon as the first char is successfully
received. This patch fixes it for me:
--- 1.36/xen/drivers/char/serial.c 2005-06-10 13:20:06 -05:00
+++ edited/drivers/char/serial.c 2005-06-15 15:54:11 -05:00
@@ -171,6 +171,8 @@
do {
for ( ; ; )
{
+ int received;
+
spin_lock_irqsave(&port->lock, flags);
if ( port->rxbufp != port->rxbufc )
@@ -179,10 +181,12 @@
break;
}
- if ( port->driver->getc(port, &c) )
- break;
+ received = port->driver->getc(port, &c);
spin_unlock_irqrestore(&port->lock, flags);
+
+ if (received)
+ break;
cpu_relax();
}
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Should I take this to mean that almost nobody uses serial console?
--
Hollis Blanchard
IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel