diff options
| author | Xiaochun Li <lixiaochun@open-hieco.net> | 2026-08-21 15:17:21 +0800 |
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2026-09-03 16:19:25 +0200 |
| commit | 2dd7ee9638a0d9d94a574c60f221da00514e6146 (patch) | |
| tree | 339ecf38b25af10b3d3faa2e302b99356aa6fabc /tools/lib/python | |
| parent | 77ae27fd98f3b548797c9f22c10ab5cf1c4ada53 (diff) | |
| download | linux-next-2dd7ee9638a0d9d94a574c60f221da00514e6146.tar.gz linux-next-2dd7ee9638a0d9d94a574c60f221da00514e6146.zip | |
printk: Remove remaining boot consoles when a real console exists
Boot consoles are temporary and should be removed once a real console is
available. However, the late init cleanup currently only unregisters boot
consoles that use init section memory. Other boot consoles are expected
to be removed when the real preferred console is registered.
This does not cover cases where a real console has registered, but the
boot console was not removed because the real console did not become the
preferred console. For example, with multiple console= parameters using
the same driver, a real 8250 console may be enabled while the early
console remains registered. The result is duplicate printk output from
both consoles.
In the mailing list discussion, two possible approaches were suggested
to fix this problem [1]. This patch implements the first one: during
printk_late_init(), check whether at least one real console is already
registered. If so, unregister all remaining boot consoles. If no real
console exists yet, keep the existing behavior and unregister only boot
consoles that reference init section memory, avoiding a period with no
console output while waiting for a deferred or modular real console.
Suggested-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/lkml/ahBsSW2bB2CRfW-k@pathway.suse.cz/ # [1]
Signed-off-by: Xiaochun Li <lixiaochun@open-hieco.net>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Link: https://patch.msgid.link/20260821071721.178517-1-lixiaochun@open-hieco.net
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
