[lkml]   [2020]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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


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(-)


 \ /
  Last update: 2020-01-10 16:40    [W:0.050 / U:2.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site