Skip to content

Fixes for console command line ordering

Tony Lindgren linux-serial lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 9 repliesIn review
  2. v33 patches 7 repliesSuperseded
  3. v22 patches 4 repliesSuperseded

Changes in v4 from the cover letter

- Revert the unusable serial core console quirk handling

- Add a minimal patch for serial_base_match_and_update_preferred_console()

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4printk: Revert add_preferred_console_match() related commitsdrivers/tty/serial/serial_base_bus.c include/linux/printk.h kernel/printk/Makefile +3 more+6 -1820 replies
2/4printk: Add match_devname_and_update_preferred_console()drivers/tty/serial/serial_base_bus.c include/linux/printk.h kernel/printk/console_cmdline.h +1 more+100 -160 replies
3/4serial: core: Revert unusable console quirk handlingdrivers/tty/serial/8250/8250_core.c drivers/tty/serial/serial_base.h drivers/tty/serial/serial_base_bus.c +1 more+0 -1681 reply
4/4serial: core: Add serial_base_match_and_update_preferred_console()drivers/tty/serial/serial_base.h drivers/tty/serial/serial_base_bus.c drivers/tty/serial/serial_core.c+57 -02 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPetr Mladek
1/4R-b
2/4R-b T-b
3/4R-b
4/4R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] Fixes for console command line ordering

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 four 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.

And we also revert all the unusable serial core console quirk handling, it does not do anything for the legacy "ttyS" named consoles. And then we add a minimal serial_base_match_and_update_preferred_console().

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 v3:

- Revert the unusable serial core console quirk handling

- Add a minimal patch for serial_base_match_and_update_preferred_console()

Changes since v2:

- Use match_devname_and_update_preferred_console() naming and update the comments

- Add a patch to rename the serial functions to use match and update naming

- Use ttyname instad of chardev in console_setup()

- Split variables per-line in console_setup()

- Initialize idx to -1 for devname in console_setup()

- Add pr_info() statement when a preferred console is associated with a devname

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 (4):
printk: Revert add_preferred_console_match() related commits
printk: Add match_devname_and_update_preferred_console()
serial: core: Revert unusable console quirk handling
serial: core: Add serial_base_match_and_update_preferred_console()

 drivers/tty/serial/8250/8250_core.c  |   5 -
 drivers/tty/serial/serial_base.h     |  22 +---
 drivers/tty/serial/serial_base_bus.c | 116 +++------------------
 drivers/tty/serial/serial_core.c     |   2 +-
 include/linux/printk.h               |   5 +-
 kernel/printk/Makefile               |   2 +-
 kernel/printk/conopt.c               | 146 ---------------------------
 kernel/printk/console_cmdline.h      |   7 +-
 kernel/printk/printk.c               | 122 ++++++++++++++++------
 9 files changed, 112 insertions(+), 315 deletions(-)
 delete mode 100644 kernel/printk/conopt.c

base-commit: 6ba59ff4227927d3a8530fc2973b80e94b54d58f

Signature · 1 line
2.45.2