Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-18 Thread Greg Kroah-Hartman
On Mon, Sep 18, 2023 at 10:29:30AM +0206, John Ogness wrote: > On 2023-09-14, John Ogness wrote: > > Provide and use wrapper functions for spin_[un]lock*(port->lock) > > invocations so that the console mechanics can be applied later on at a > > single place and does not require to copy the same

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-18 Thread John Ogness
On 2023-09-14, John Ogness wrote: > Provide and use wrapper functions for spin_[un]lock*(port->lock) > invocations so that the console mechanics can be applied later on at a > single place and does not require to copy the same logic all over the > drivers. For the full 74-patch series:

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-16 Thread John Ogness
On 2023-09-15, Ilpo Järvinen wrote: > Would this also be useful to enable printing to console while under > port's lock (by postponing the output until the lock is released)? > > E.g., 8250_dw.c has had this commented out since the dawn on time: > /* > * FIXME: this deadlocks if

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-16 Thread John Ogness
On 2023-09-15, "Maciej W. Rozycki" wrote: > Maybe dz.c shouldn't be touched by this series then? Correct. This series is only wrapping the uart port lock, which dz.c is not using. > Though obviously both drivers will have to be eventually adapted for > the ultimate console rework. Correct.

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-15 Thread Maciej W. Rozycki
On Fri, 15 Sep 2023, Thomas Gleixner wrote: > >> Patches 2-74 switch all uart port locking call sites to use the new > >> wrappers. These patches were automatically generated using coccinelle. > > > > Hmm, no need to do this for drivers/tty/serial/zs.c? > > zs.c does not use port lock at all.

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-15 Thread Thomas Gleixner
On Thu, Sep 14 2023 at 20:01, Maciej W. Rozycki wrote: > On Thu, 14 Sep 2023, John Ogness wrote: > >> Patches 2-74 switch all uart port locking call sites to use the new >> wrappers. These patches were automatically generated using coccinelle. > > Hmm, no need to do this for

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-15 Thread Ilpo Järvinen
On Thu, 14 Sep 2023, John Ogness wrote: > When a serial port is used for kernel console output, then all > modifications to the UART registers which are done from other contexts, > e.g. getty, termios, are interference points for the kernel console. > > So far this has been ignored and the

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-14 Thread Maciej W. Rozycki
On Thu, 14 Sep 2023, John Ogness wrote: > Patches 2-74 switch all uart port locking call sites to use the new > wrappers. These patches were automatically generated using coccinelle. Hmm, no need to do this for drivers/tty/serial/zs.c? Maciej

[PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-14 Thread John Ogness
When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, e.g. getty, termios, are interference points for the kernel console. So far this has been ignored and the printk output is based on the principle of hope. The