Thread (32 messages) 32 messages, 6 authors, 2015-03-05
STALE4123d

Re: [PATCH 00/10] drivers: PL011: add ARM SBSA Generic UART support

From: Dave P Martin <Dave.Martin@arm.com>
Date: 2015-01-20 14:32:54
Also in: linux-arm-kernel
Subsystem: arm primecell uart pl010 and pl011 drivers, the rest, tty layer and serial drivers · Maintainers: Russell King, Linus Torvalds, Greg Kroah-Hartman, Jiri Slaby

On Tue, Jan 20, 2015 at 01:08:32PM +0000, Graeme Gregory wrote:

[...]
I have tested this series on Juno where it seems to work and also on FVP
model where there are some issues.

On the FVP when we enter usespace a couple of 32 character strings are
printed then nothing else. 32 Characters is a suspicious number.

This occurs with both OE based FS from linaro and debian ubstable FS.

My FVP is version 5602
Can you try this:
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index eb397c7..9ca78db 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1291,6 +1291,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap)
 		writew(uap->port.x_char, uap->port.membase + UART01x_DR);
 		uap->port.icount.tx++;
 		uap->port.x_char = 0;
+		BUG_ON(uap->tx_avail < 1);
 		uap->tx_avail--;
 		return;
 	}

If we can hit that BUG_ON, then it's possible tx_avail is wrapping round
here, though I'm not sure if it is likely to occur in practice.

I'll have a look for other potential issues...

Cheers
---Dave
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help