RFC tty: amba-pl011: Decruft and streamline earlycon output
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tty: amba-pl011: earlycon: Switch to relaxed I/Odrivers/ | +47 | 0 replies | |
| 2/3 | tty: amba-pl011: earlycon: Unify earlycon backendsdrivers/ | +20 | 0 replies | |
| 3/3 | tty: amba-pl011: earlycon: Don't drain the transmitter after each chardrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] tty: amba-pl011: Decruft and streamline earlycon output
This series avoids waiting for the UART transmitter to go idle in between every earlycon char written, and does some refactoring so that this change doesn't have to be implemented multiple times.
The initial motiviation for this is a performance issue encountered during Xen virtual UART development (see [1] and patch 3).
It's debatable whether this is Linux's responsibility or the responsibility of the virtual UART: this is a situation where the virtualised behaviour is inevitably so different from hardware that it's hard to make a ruling on exactly what behaviour is reasonable. The best course is probably to work around it on _both_ ends, in the interest of best interoperation.
Currently amba-pl011 has two distinct earlycon implementations: a generic pl011 implementation and a quirked implementation that works around the lack of a usable BUSY status bit in QDF2400 SoCs.
I don't like applying the same obscure fix in multiple places if I can avoid it, so I've had a go at unifying the earlycons here (patches 1-2).
I'd appreciate people's views, particularly on:
* (pl011) Whether to refactor harder: the caching of vendor->reg_offset vendor->access_32b in uart_amba_port is convenient and avoids chasing an extra pointer in the common case, but this the refactoring for the earlycon case a bit ugly. Maybe we can do better.
* (pl011, serial_core) Whether the new use of port->private_data will conflict with existing code (no, AFAICT).
* (earlycon) Whether overriding port->iotype for 32-bit-only implementations is the right thing to do.
* (earlycon) Whether there is some reason to drain the transmitter after every char that I've overlooked.
Currently I don't consider this to be a candidate for stable, but it could be backported. Due to the steady quirkage churn in amba-pl011, it would be better to drop the refactoring stuff for backporting purposes.
Testing:
* tested rather casually no ARM Juno r0 (real PL011) and the ARM VFP Base Model (emulated PL011)
* *Not tested* on QDF2400, since I don't have access to one. Someone probably ought to test that.
[1] Re: [Xen-devel] [PATCH 26/27 v12] arm/xen: vpl011: Fix the slow early console SBSA UART output
https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg01949.html
Dave Martin (3):
tty: amba-pl011: earlycon: Switch to relaxed I/O
tty: amba-pl011: earlycon: Unify earlycon backends
tty: amba-pl011: earlycon: Don't drain the transmitter after each char
drivers/tty/serial/amba-pl011.c | 108 +++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 47 deletions(-)
Signature · 1 line
2.1.4