On Mon, 11 Dec 2006, Alan wrote:
> > there as "protocols" for user-tty interfaces, i.e., you need a user, that
> > opens a tty, sets a line discipline to it, and does io (read/write) over
> > it, and NOT to be completely initialised and driven from the kernel.
>
> Take a look at the SLIP driver. User space sets up the port but all the
> actual I/O is to/from the kernel not via user space.
Ok, to be specific, linkstation-like mpc8241-based NAS systems have an AVR
perform power management functions, and it is connected over a UART. Some
of the functions you have to perform:
1) disable the watchdog at startup otherwise it powers the system down in
a few minutes. This is done by sending about 20 bytes to it - more than
fits in UART's fifo. So, you need interrupts / polling. It is arguable
whether this should be done / initialised from the user- or from the
kernel-space. Earlier it was done from the user space completely, I put it
into the kernel completely to get a runnable system even without
user-space hacks.
2) run-time operation, like fan control, sensors, maybe some other
functions. These all should and are currently done completely from a
user-space process over a normal tty.
3) reboot / halt. Consists of 2 parts. The actual command, that can be
sent earlier from the userspace too, and the final "commit", that actually
reboots / powers down the system. That is the last command in platform's
reboot / poweroff functions. Currently I do both parts from the kernel so
with the current kernel you get a completely functional system with "any"
generic distribution.
So, if we decide to put 1) in the user-space too, it becomes almost a
normal line discipline with the only need to initiate io from the kernel
for 3), which is just sending about 4 bytes over the port anyway, and can
be (and is) just done in a tight infinite loop. But I'd prefer to keep 1)
and 3) in the kernel and perform it without waiting for any user-space
daemons...
What do you think?
Thanks
Guennadi
---
Guennadi Liakhovetski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]