Re: [PATCH printk v5 21/30] printk: nbcon: Use nbcon consoles in console_flush_all()

From: Petr Mladek
Date: Tue May 21 2024 - 04:41:49 EST


On Thu 2024-05-02 23:44:30, John Ogness wrote:
> Allow nbcon consoles to print messages in the legacy printk()
> caller context (printing via unlock) by integrating them into
> console_flush_all(). The write_atomic() callback is used for
> printing.
>
> Provide nbcon_legacy_emit_next_record(), which acts as the
> nbcon variant of console_emit_next_record(). Call this variant
> within console_flush_all() for nbcon consoles. Since nbcon
> consoles use their own @nbcon_seq variable to track the next
> record to print, this also must be appropriately handled in
> console_flush_all().
>
> Note that the legacy printing logic uses @handover to detect
> handovers for printing all consoles. For nbcon consoles,
> handovers/takeovers occur on a per-console basis and thus do
> not cause the console_flush_all() loop to abort.
>
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr