tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (Semi-random) thoughts on device tree structure and devfs



On Fri, Mar 12, 2010 at 09:00:11AM +0000, Iain Hibbert wrote:
 >>>> Could you show one (or more) real example(s) / senario(s)?  That would
 >>>> help to understand problems & clarify requirements...
 >>>
 >>> Well, a line discipline which takes serial IO and converts it into a soft
 >>> device which interacts with the rest of the system.
 >>
 >> Line disciplines are a bad example, because they're a prehistoric kind
 >> of hacked-up bus attachment and as such ought to be rototilled out of
 >> existence.
 > 
 > Well, line discipline is a solution to a problem, which is that we want a
 > 'device' in the kernel but the device is not directly accessible and
 > communicates to us through a serial protocol.
 > 
 > You can say its a bad idea all you like, but unless you suggest an
 > alternative solution that doesn't help to remove it.

I did; bus attachments.

That is, instead of just having "com* at pci*" or whatever and all the
tty stuff being a legacy blob layer you'd do something like this:       

   attach com at pci with ...
   attach sl at com with ...
   attach ppp at com with ...
   attach tty at com with ...

and then connect things up on the fly at runtime using whatever
suitable device control tools.

This is not necessarily that different from line disciplines in
practice (maybe, maybe not), but it's a lot cleaner structurally and
it allows this stuff to share common infrastructure with the rest of
the device tree. Whatever that infrastructure might be in the long
run.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index