2004-01-02 00:18:17

by Hollis Blanchard

[permalink] [raw]
Subject: Re: udev and devfs - The final word

On Wednesday, Dec 31, 2003, at 15:52 US/Central, Tommi Virtanen wrote:
> I think devfs names are accepted as root= arguments, so that's a bit of
> a loss.. with udev, your /dev and your root= are equal only if you
> follow the standard naming.
>
> For root=, I can see how early userspace can move that to userspace.
> But what about swsuspend?
>
> Are there any more kernel options taking file names? I think now would
> be a good time to stop adding more of them :)

"console=" takes driver-supplied names which usually happen to match
/dev node names. For example, drivers/serial/8250.c names itself
"ttyS", so "console=ttyS0" will end up going to that driver, regardless
of the state of /dev.

I'm not saying that's good or bad, but what's the alternative?
"console=class/tty/ttyS0"?

--
Hollis Blanchard
IBM Linux Technology Center


2004-01-02 00:36:58

by Al Viro

[permalink] [raw]
Subject: Re: udev and devfs - The final word

On Thu, Jan 01, 2004 at 06:17:43PM -0600, Hollis Blanchard wrote:
> "console=" takes driver-supplied names which usually happen to match
> /dev node names. For example, drivers/serial/8250.c names itself
> "ttyS", so "console=ttyS0" will end up going to that driver, regardless
> of the state of /dev.
>
> I'm not saying that's good or bad, but what's the alternative?
> "console=class/tty/ttyS0"?

Console code will need serious work anyway; note that current names
do _not_ refer to tty devices - there is some overlap, but right now
we have
* console drivers
* some of them being connected with tty drivers; those can tell
which tty driver corresponds to them
* console ouput code maintaining chain of console drivers; output
is sent to them, attempt to open() /dev/console ends up picking the first
console driver that has corresponding tty one (== has console->device())
and opening the tty device in question
* unholy mess with redirects.

There's no device nodes for console drivers. So names in console=... are
something very odd, indeed.

2004-01-03 06:05:58

by Greg KH

[permalink] [raw]
Subject: Re: udev and devfs - The final word

On Thu, Jan 01, 2004 at 06:17:43PM -0600, Hollis Blanchard wrote:
> On Wednesday, Dec 31, 2003, at 15:52 US/Central, Tommi Virtanen wrote:
> >I think devfs names are accepted as root= arguments, so that's a bit of
> >a loss.. with udev, your /dev and your root= are equal only if you
> >follow the standard naming.
> >
> >For root=, I can see how early userspace can move that to userspace.
> >But what about swsuspend?
> >
> >Are there any more kernel options taking file names? I think now would
> >be a good time to stop adding more of them :)
>
> "console=" takes driver-supplied names which usually happen to match
> /dev node names. For example, drivers/serial/8250.c names itself
> "ttyS", so "console=ttyS0" will end up going to that driver, regardless
> of the state of /dev.

These are just string matches that the different console drivers use.
They have nothing to do with an actual /dev node.

thanks,

greg k-h