From: Petr Mladek <pmladek@suse.com>
To: Tony Lindgren <tony.lindgren@linux.intel.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"John Ogness" <john.ogness@linutronix.de>,
"Sergey Senozhatsky" <senozhatsky@chromium.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Tony Lindgren" <tony@atomide.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] printk: Track command line console positions to fix console order
Date: Wed, 12 Jun 2024 16:48:10 +0200 [thread overview]
Message-ID: <Zmm1KpOKkigPRyrG@pathway.suse.cz> (raw)
In-Reply-To: <ZmgfZr5ccHATnkAA@tlindgre-MOBL1>
On Tue 2024-06-11 12:56:54, Tony Lindgren wrote:
> On Tue, Jun 11, 2024 at 10:17:11AM +0200, Petr Mladek wrote:
> > On Thu 2024-06-06 14:41:46, Tony Lindgren wrote:
> > > Recent changes to allow using DEVNAME:0.0 style console names caused a
> > > regression to the kernel command line handling for the console options.
> >
> > Sigh, I have missed that it has already ended in the mainline via
> > the tty tree :-/
> >
> > Honestly, I would prefer to revert it and implement it a clean way.
> > I see a lot of existing and possible problems:
>
> Naturally no objection from me for reverting if there are issues that are
> unfixable from the printk point of view. I'll update the fix along the
> lines you're suggesting below though, let's see if that's enough for the
> -rc cycle.
OK, let's see how the updated fix looks like.
> > 1. Where and how is DEVNAME:0.0 defined?
> >
> > The only documentation seems to be in
> > Documentation/admin-guide/kernel-parameters.txt for the console=
> > parameter:
> >
> > <paste>
> > <DEVNAME>:<n>.<n>[,options]
> > Use the specified serial port on the serial core bus.
> > The addressing uses DEVNAME of the physical serial port
> > device, followed by the serial core controller instance,
> > and the serial port instance. The options are the same
> > as documented for the ttyS addressing above.
> >
> > The mapping of the serial ports to the tty instances
> > can be viewed with:
> >
> > $ ls -d /sys/bus/serial-base/devices/*:*.*/tty/*
> > /sys/bus/serial-base/devices/00:04:0.0/tty/ttyS0
> >
> > In the above example, the console can be addressed with
> > console=00:04:0.0. Note that a console addressed this
> > way will only get added when the related device driver
> > is ready. The use of an earlycon parameter in addition to
> > the console may be desired for console output early on.
> > </paste>
> >
> > This seems to be a brand new bus.
> >
> > Is it stable?
> > Is it documented in Documentation/ABI/stable/?
>
> I think the DEVNAME originates from udev to be used for various rules. Yes
> it should be documented somewhere though. I'd say it's stable as it's been
> in use for years :)
>
> > It seems that the feature will cover "only" serial consoles.
> > But DEVNAME is a generic name. It might make more sense to
> > call it "SERIAL_BASE_DEVNAME" or "SERIAL_DEVNAME" or "SBASE_DEVNAME" or so.
> >
> > Anyway, console= is an interface with the user space. We will need to
> > maintain the backward compatibility "forever".
> >
> > => we should think twice about the interface !!!
>
> I think we want to keep it generic with DEVNAME, I don't see why we'd want
> make it serial console specific, at least in the code. For the documentation,
> I think the kernel parameters example is clear on the serial port usage?
OK, let's keep the DEVNAME in both the code and documentation,
> > 3. The delimiter between "DEVNAME" and X.Y numbers is ":".
> > But ":" is also part of the sample DEVNAME "00:00"
> >
> > Is it a good idea?
> >
> > Is the current naming scheme a well known historic one
> > or something invented for the new bus?
>
> PCI and USB use a ":" already for the device naming. Also a "-" can be used
> by the device names, many platform devices do that. I don't think we can
> pick any better limiter here, at least out of the ":", "-" and "." options.
OK, it seems that ':' is the best choice.
And thanks for explaining the other details. Everything makes more sense now.
Best Regards,
Petr
prev parent reply other threads:[~2024-06-12 14:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 11:41 [PATCH 1/2] printk: Track command line console positions to fix console order Tony Lindgren
2024-06-06 11:41 ` [PATCH 2/2] Revert "printk: Flag register_console() if console is set on command line" Tony Lindgren
2024-06-11 8:17 ` [PATCH 1/2] printk: Track command line console positions to fix console order Petr Mladek
2024-06-11 9:56 ` Tony Lindgren
2024-06-11 13:10 ` Andy Shevchenko
2024-06-11 14:01 ` Tony Lindgren
2024-06-12 14:48 ` Petr Mladek [this message]
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=Zmm1KpOKkigPRyrG@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tony.lindgren@linux.intel.com \
--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