[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200110153932.14970-1-john.ogness@linutronix.de>
Date: Fri, 10 Jan 2020 16:45:30 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Dick Hollenbeck <dick@...tplc.com>,
linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org
Subject: [PATCH RT 0/2] serial: 8250: atomic console fixups
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
Powered by blists - more mailing lists