lkml.org 
[lkml]   [2009]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to handle console devices
> I don't know what the best way is to accomplish this.  Create dummy
> inode and file structs and pass them to the usual tty_open() routine?
> (But then what about hangup event handling?) What do you think?

What I long term envisioned was that

- Every tty (or at least every interesting tty) would have a tty_port
object for the hardware [done now for all consoles but vt]
- Every tty port object would have an "output" method
- The tty->termios would move to the tty_port
- The tty receive buffers would move to the tty_port (only needed for a
console that supports input)

At that point
- The tty lock/refcount isn't needed all the time for the receive data
paths which speeds it up a fair bit
- A console can be implemented without a tty_struct anywhere in sight
- Flow control and speed setting can be done on hardware generically on
resume paths

That fixes the lifetime and magic object invention issues that plague the
current console.

I still think that is the right way to fix it.

Alan


\
 
 \ /
  Last update: 2009-09-30 00:49    [W:0.040 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site