From: Tony Lindgren <tony.lindgren@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>, Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Tony Lindgren <tony@atomide.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-serial@vger.kernel.org,
"Tony Lindgren" <tony.lindgren@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/3] Fixes for console command line ordering
Date: Tue, 18 Jun 2024 07:54:47 +0300 [thread overview]
Message-ID: <20240618045458.14731-1-tony.lindgren@linux.intel.com> (raw)
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 three 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 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 (3):
printk: Revert add_preferred_console_match() related commits
printk: Add match_devname_and_update_preferred_console()
serial: core: Rename preferred console handling for match and update
drivers/tty/serial/8250/8250_core.c | 4 +-
drivers/tty/serial/serial_base.h | 4 +-
drivers/tty/serial/serial_base_bus.c | 23 +++--
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 ++++++++++++++++------
8 files changed, 111 insertions(+), 202 deletions(-)
delete mode 100644 kernel/printk/conopt.c
base-commit: 6ba59ff4227927d3a8530fc2973b80e94b54d58f
--
2.45.2
next reply other threads:[~2024-06-18 4:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 4:54 Tony Lindgren [this message]
2024-06-18 4:54 ` [PATCH v3 1/3] printk: Revert add_preferred_console_match() related commits Tony Lindgren
2024-06-18 4:54 ` [PATCH v3 2/3] printk: Add match_devname_and_update_preferred_console() Tony Lindgren
2024-06-18 13:16 ` Petr Mladek
2024-06-18 4:54 ` [PATCH v3 3/3] serial: core: Rename preferred console handling for match and update Tony Lindgren
2024-06-18 5:38 ` Greg Kroah-Hartman
2024-06-18 13:51 ` Petr Mladek
2024-06-19 4:39 ` Tony Lindgren
2024-06-19 7:17 ` Tony Lindgren
2024-06-19 12:08 ` Petr Mladek
2024-06-19 12:35 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240618045458.14731-1-tony.lindgren@linux.intel.com \
--to=tony.lindgren@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).