From: John Ogness <john.ogness@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Dick Hollenbeck <dick@softplc.com>,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: [PATCH RT 0/2] serial: 8250: atomic console fixups
Date: Fri, 10 Jan 2020 16:45:30 +0106 [thread overview]
Message-ID: <20200110153932.14970-1-john.ogness@linutronix.de> (raw)
Dick Hollenbeck pointed out[0] that serial usage for non-consoles
was dramatically affected due to the atomic console
implementation. Indeed, the implementation was taking the global
console_atomic_lock for _all_ 8250 ports, regardless if they were
consoles or not.
This series fixes that by only using the cpu-lock if the port is
a console. While making those changes, I realized that the clear
counter/ier-cache is not needed, so that is also removed.
Dick also pointed out that the IER accessor functions were using
non-typical names. These are updated and moved to inline macros.
Finally, I noticed that the fsl, ingenic, and mtk variants were
directly accessing IER. These are now also appropriately wrapped.
In his suggestion, Dick did optimizations regarding IER caching.
However, these are _not_ included because they may have some
unwanted side-effects. For example, I noticed a few places in
8250 code where the value of uart_8250_port->ier is expected to
be different than the hardware register.
John Ogness
[0] https://www.spinics.net/lists/linux-rt-users/msg21480.html
John Ogness (2):
serial: 8250: only atomic lock for console
serial: 8250: fsl/ingenic/mtk: fix atomic console
drivers/tty/serial/8250/8250.h | 65 ++++++++++++++-------
drivers/tty/serial/8250/8250_core.c | 6 +-
drivers/tty/serial/8250/8250_dma.c | 4 +-
drivers/tty/serial/8250/8250_fsl.c | 9 +++
drivers/tty/serial/8250/8250_ingenic.c | 7 +++
drivers/tty/serial/8250/8250_mtk.c | 29 ++++++++-
drivers/tty/serial/8250/8250_port.c | 81 ++++++--------------------
7 files changed, 109 insertions(+), 92 deletions(-)
--
2.20.1
next reply other threads:[~2020-01-10 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 15:39 John Ogness [this message]
2020-01-10 15:39 ` [PATCH RT 1/2] serial: 8250: only atomic lock for console John Ogness
2020-01-10 15:39 ` [PATCH RT 2/2] serial: 8250: fsl/ingenic/mtk: fix atomic console John Ogness
2020-01-10 17:36 ` [PATCH RT 0/2] serial: 8250: atomic console fixups Dick Hollenbeck
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=20200110153932.14970-1-john.ogness@linutronix.de \
--to=john.ogness@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=dick@softplc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=sergey.senozhatsky@gmail.com \
/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).