[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87jzk7i67y.fsf@jogness.linutronix.de>
Date: Mon, 06 May 2024 12:35:21 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, Steven Rostedt
<rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>
Subject: Re: [PATCH printk v5 11/30] nbcon: Provide functions for drivers to
acquire console for non-printing
On 2024-05-02, John Ogness <john.ogness@...utronix.de> wrote:
> diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
> index dd7c3180b335..b8a7e3e136d3 100644
> --- a/kernel/printk/nbcon.c
> +++ b/kernel/printk/nbcon.c
> @@ -989,3 +991,54 @@ void nbcon_free(struct console *con)
>
> con->pbufs = NULL;
> }
> +
> +/**
> + * nbcon_driver_try_acquire - Try to acquire nbcon console and enter unsafe
> + * section
> + * @con: The nbcon console to acquire
> + *
> + * Context: Under the locking mechanism implemented in
> + * @con->device_lock() including disabling migration.
* Return: True if the console was acquired. False otherwise.
John
Powered by blists - more mailing lists