[PATCH] Stop pmac_zilog from abusing 8250's device numbers.

H. Peter Anvin hpa at zytor.com
Thu Apr 5 02:16:42 EST 2007


Theodore Tso wrote:
> 
> The other thing I would probably do if I were to do it all over again
> is allow serial devices to be named independent of /dev/ttySx
> interface, these days probably using /sysfs, so that you could easily
> query to figure out what serial controllers/cards were on the system,
> and assign specific controllers/ports to specific /dev/ttySx devices.
> We could also provide a registration system to allow on-line
> configuration of non-probeable serial cards attached to primitive
> buses that don't alllow probing, such as the ISA bus, although perhaps
> that's much less important in this day and age.
> 

One option would be to move the 8250-based serial ports, to, say, 
/dev/ttyN* (for National Semiconductors -- the best I could come up 
with) and redefine /dev/ttyS* as a serial port multiplexer which maps in 
all the types, for the ones that really want dynamic mapping.

Then the ones who want static mapping can still have them.  This would 
presumably work with early remapping in open(), similar to the way ptmx 
is done.

Of course, now you have the potential of aliasing, again, which tends to 
cause all kinds of headaches w.r.t. locking.  From that perspective, it 
would be better if udev made symlinks, and we made the kernel use some 
sort of discovery syntax for console= (say, "console=serial0" to hunt 
down the "first" serial port for some definition thereof.)

	-hpa



More information about the Linuxppc-dev mailing list