mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: "Sergey Senozhatsky" <senozhatsky@chromium.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Marcos Paulo de Souza" <mpdesouza@suse.com>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
	"Fushuai Wang" <wangfushuai@baidu.com>,
	"Kees Cook" <kees@kernel.org>,
	"Stepan Ionichev" <sozdayvek@gmail.com>,
	linux-serial@vger.kernel.org,
	"Manuel Lauss" <manuel.lauss@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] braille: nbcon: Allow using a serial driver converted to nbcon API as a Braille console
Date: Tue, 29 Sep 2026 14:52:51 +0200	[thread overview]
Message-ID: <aru0o0G-YpgGa7pp@pathway.suse.cz> (raw)
In-Reply-To: <87ld8pp2wq.fsf@jogness.linutronix.de>

On Fri 2026-09-25 21:11:41, John Ogness wrote:
> On 2026-09-25, Petr Mladek <pmladek@suse.com> wrote:
> > I used on the command line:
> >
> > 	console=brl,ttyS0,115200 console=tty0
> >
> > The serial console driver is not in console_list. But it shows
> > all printk() messages because tty0 is in console_list and
> > the messages are shown there.
> 
> Got it. So from the perspective of printk() we have a legacy
> console. The legacy console is (mis)using the write callback of a
> console driver to write to the underlying device. And since the driver
> for the underlying device is NBCON, these contexts do not match. But
> actually it is more complicated than that, because the console driver
> callback is being used for all vt updates, not just those from printk().

Yes. This looks like a good description of the situation.

> Since the 8250 driver (and so far all NBCON UART drivers) use the port
> lock for the ->device_lock() callback, it would be enough to do:
> 
> 	con->device_lock();
> 	con->write_thread();
> 	con->device_unlock();

I'll play with this and use it in v3 when the code looks reasonable.
I'll try to get the nbcon context as well. It will be for !PREEMPT_RT anyway.

> if it is NBCON. That would at least provide proper locking (port lock)
> for the underlying device during runtime. The only downside is that
> panic could deadlock if the panic occurred while a CPU is holding the
> port lock.

Yup, we would need some special handling in panic and rely just on
the nbcon context.

Best Regards,
Petr

      reply	other threads:[~2026-09-29 12:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  7:25 Petr Mladek
2026-09-22  7:25 ` [PATCH 1/2] printk: nbcon: Introduce Braille helpers Petr Mladek
2026-09-25 13:48   ` John Ogness
2026-09-25 14:34     ` Petr Mladek
2026-09-27 18:47       ` Samuel Thibault
2026-09-22  7:25 ` [PATCH 2/2] braille: nbcon: Use nbcon atomic console callbacks Petr Mladek
     [not found]   ` <20260922073728.2ADCD1F000FF@smtp.kernel.org>
2026-09-23 14:39     ` Petr Mladek
2026-09-25 14:34   ` John Ogness
2026-09-24 23:53 ` [PATCH 0/2] braille: nbcon: Allow using a serial driver converted to nbcon API as a Braille console Samuel Thibault
2026-09-25 13:08 ` John Ogness
2026-09-25 14:10   ` Petr Mladek
2026-09-25 14:36     ` John Ogness
2026-09-25 14:49       ` Petr Mladek
2026-09-25 15:05         ` John Ogness
2026-09-25 15:41           ` Petr Mladek
2026-09-25 19:05             ` John Ogness
2026-09-29 12:52               ` Petr Mladek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aru0o0G-YpgGa7pp@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hvilleneuve@dimonoff.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=manuel.lauss@gmail.com \
    --cc=mpdesouza@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=senozhatsky@chromium.org \
    --cc=sozdayvek@gmail.com \
    --cc=wangfushuai@baidu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®