public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fixes for console command line ordering
@ 2024-06-13 12:51 Tony Lindgren
  2024-06-13 12:51 ` [PATCH v2 1/2] printk: Revert add_preferred_console_match() related commits Tony Lindgren
  2024-06-13 12:51 ` [PATCH v2 2/2] printk: Add update_preferred_console() Tony Lindgren
  0 siblings, 2 replies; 7+ messages in thread
From: Tony Lindgren @ 2024-06-13 12:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Petr Mladek, Steven Rostedt,
	John Ogness, Sergey Senozhatsky, Tony Lindgren, Andy Shevchenko
  Cc: Ilpo Järvinen, linux-serial, Tony Lindgren, linux-kernel

Hi,

Recent changes to add support for DEVNAME:0.0 style consoles caused a
regression with the preferred console order where the last console on
the kernel command line is no longer the preferred console.

The following two changes fix the issue using Petr's suggestion that does
not involve calling __add_preferred_console() later on again, and adds
the deferred consoles to the console_cmdline[] directly to be updated
when the console is ready.

We revert the earlier printk related changes, and then add back the
DEVNAME:0.0 functionality based on Petr's code snippet. And we end up
reducing the code quite a bit too this way.

The reason we want DEVNAME:0.0 style consoles is it helps addressing the
console based on the connected serial port controller device rather than
using the hardcoded ttyS addressing. And that helps with issues related
to the console moving around after togging the HSUART option in the BIOS,
or when new ports are enabled in devicetree and aliases are not updated.

Regards,

Tony

Changes since v1:

- Revert the problem causing printk changes and switch to using the
  solution based on Petr's suggestion and code snippet

Tony Lindgren (2):
  printk: Revert add_preferred_console_match() related commits
  printk: Add update_preferred_console()

 drivers/tty/serial/serial_base_bus.c |   2 +-
 include/linux/printk.h               |   3 +-
 kernel/printk/Makefile               |   2 +-
 kernel/printk/conopt.c               | 146 ---------------------------
 kernel/printk/console_cmdline.h      |   7 +-
 kernel/printk/printk.c               |  96 ++++++++++++------
 6 files changed, 69 insertions(+), 187 deletions(-)
 delete mode 100644 kernel/printk/conopt.c


base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670
-- 
2.45.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-17  8:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 12:51 [PATCH v2 0/2] Fixes for console command line ordering Tony Lindgren
2024-06-13 12:51 ` [PATCH v2 1/2] printk: Revert add_preferred_console_match() related commits Tony Lindgren
2024-06-14 17:18   ` Petr Mladek
2024-06-13 12:51 ` [PATCH v2 2/2] printk: Add update_preferred_console() Tony Lindgren
2024-06-14 17:17   ` Petr Mladek
2024-06-17  7:20     ` Tony Lindgren
2024-06-17  8:03       ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox