public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] 2.5.17 /dev/port
@ 2002-05-22 22:46 Andries.Brouwer
  2002-05-22 23:32 ` H. Peter Anvin
  0 siblings, 1 reply; 3+ messages in thread
From: Andries.Brouwer @ 2002-05-22 22:46 UTC (permalink / raw)
  To: linux-kernel

> Anybody: if you've ever used /dev/ports, holler _now_.

Holler.


In my eyes /dev/port is a rather unimportant corner
of the kernel. Removing it does not streamline anything,
we hear that it saves 454 bytes. A worthy goal, but..

Today a few things use /dev/port. Some low level mouse,
keyboard and console utilities. kbdrate. hwclock.

Is it needed? Hardly - most uses can be replaced by inb()
and outb(). But I am not sure why that would be better.
And I seem to recall that hwclock on some flavours of Alpha
really needed the /dev/port way. But I may be mistaken.


I have also seen systems that used /dev/port as
the implementation of inb() and and outb():
 outb(int p, char v) { lseek(fd,p,0); write(fd,&v,1); }
That way one could access keyboard, sound, rtc etc
while the underlying hardware was rather different from i86.


A further advantage of having /dev/port is that it allows one
to set keyboard or mouse or whatever properties from anything
that is able to access a file. But outb() or ioctl() probably
require something close to a C environment.
Probably this is what Alan is saying.


It is rather unimportant, but there are a few uses, and removing it
does not really have any positive effect. Quickly the 454 bytes
won will be lost again to the new ioctls, and to the filesystem
that Al develops to set the border colour of the monitor screen
and become a bleeding edge developer too.


Andries


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-23  1:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-22 22:46 [PATCH] 2.5.17 /dev/port Andries.Brouwer
2002-05-22 23:32 ` H. Peter Anvin
2002-05-23  1:59   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox