From: Dave Martin <Dave.Martin@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Andre Przywara <andre.przywara@arm.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Russell King <linux@armlinux.org.uk>,
Andy Gross <andy.gross@linaro.org>,
linux-serial@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bhupinder Thakur <bhupinder.thakur@linaro.org>
Subject: [RFC PATCH 0/3] tty: amba-pl011: Decruft and streamline earlycon output
Date: Wed, 18 Oct 2017 15:14:45 +0100 [thread overview]
Message-ID: <1508336088-3948-1-git-send-email-Dave.Martin@arm.com> (raw)
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(-)
--
2.1.4
next reply other threads:[~2017-10-18 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 14:14 Dave Martin [this message]
2017-10-18 14:14 ` [RFC PATCH 1/3] tty: amba-pl011: earlycon: Switch to relaxed I/O Dave Martin
2017-10-18 14:14 ` [RFC PATCH 2/3] tty: amba-pl011: earlycon: Unify earlycon backends Dave Martin
2017-10-18 14:14 ` [RFC PATCH 3/3] tty: amba-pl011: earlycon: Don't drain the transmitter after each char Dave Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508336088-3948-1-git-send-email-Dave.Martin@arm.com \
--to=dave.martin@arm.com \
--cc=andre.przywara@arm.com \
--cc=andy.gross@linaro.org \
--cc=bhupinder.thakur@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).