[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230915202122.ulgy4fdxpsxmecbo@pengutronix.de>
Date: Fri, 15 Sep 2023 22:21:22 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: John Ogness <john.ogness@...utronix.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marek Vasut <marex@...x.de>, Petr Mladek <pmladek@...e.com>,
Fabio Estevam <festevam@...il.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Rob Herring <robh@...nel.org>,
Jiri Slaby <jirislaby@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Tom Rix <trix@...hat.com>, linux-kernel@...r.kernel.org,
Sergey Organov <sorganov@...il.com>,
NXP Linux Team <linux-imx@....com>,
linux-serial@...r.kernel.org,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Shawn Guo <shawnguo@...nel.org>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH tty v1 29/74] serial: imx: Use port lock wrappers
On Thu, Sep 14, 2023 at 08:43:46PM +0206, John Ogness wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> 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 rework of the console infrastructure which aims to
> support threaded and atomic consoles, requires to mark sections which
> modify the UART registers as unsafe. This allows the atomic write function
> to make informed decisions and eventually to restore operational state. It
> also allows to prevent the regular UART code from modifying UART registers
> while printk output is in progress.
>
> All modifications of UART registers are guarded by the UART port lock,
> which provides an obvious synchronization point with the console
> infrastructure.
>
> To avoid adding this functionality to all UART drivers, wrap the
> spin_[un]lock*() invocations for uart_port::lock into helper functions
> which just contain the spin_[un]lock*() invocations for now. In a
> subsequent step these helpers will gain the console synchronization
> mechanisms.
>
> Converted with coccinelle. No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
This lacks a Signed-off line by John.
Otherwise looks fine to me.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists