On Sat 2025-12-27 09:16:22, Marcos Paulo de Souza wrote:
> The register_console_force function was introduced to register consoles
> even on the presence of default consoles, replacing the CON_ENABLE flag
> that was forcing the same behavior.
>
> --- a/drivers/tty/serial/mux.c
> +++ b/drivers/tty/serial/mux.c
> @@ -390,7 +390,7 @@ static struct console mux_console = {
> .write = mux_console_write,
> .device = uart_console_device,
> .setup = mux_console_setup,
> - .flags = CON_ENABLED | CON_PRINTBUFFER,
> + .flags = CON_PRINTBUFFER,
> .index = 0,
> .data = &mux_driver,
> };
> @@ -547,7 +547,7 @@ static int __init mux_init(void)
> mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
>
> #ifdef CONFIG_SERIAL_MUX_CONSOLE
> - register_console(&mux_console);
> + register_console_force(&mux_console);
The situation here is the same as in 16th patch for
ma35d1serial_console().
Also "mux_console" is assigned to
static int __init mux_probe(struct parisc_device *dev)
{
[...]
mux_driver.cons = MUX_CONSOLE;
status = uart_register_driver(&mux_driver);
[...]
status = uart_add_one_port(&mux_driver, port);
[...]
}
So, that it can get registered also by:
+ mux_probe()
+ uart_add_one_port()
+ serial_ctrl_register_port()
+ serial_core_register_port()
+ serial_core_add_one_port()
+ uart_configure_port()
+ register_console()
And we would need to pass the "force" information via CON_FORCE flag.
Best Regards,
Petr