Re: [PATCH] 2.5.17 /dev/port

H. Peter Anvin (hpa@zytor.com)
22 May 2002 16:32:04 -0700


Followup to: <UTC200205222246.g4MMkNL26024.aeb@smtp.cwi.nl>
By author: Andries.Brouwer@cwi.nl
In newsgroup: linux.dev.kernel
>
> 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.
>

On non-Intel platforms, with no dedicated IOIO opcodes, IOIO is
usually implemented as a specific memory range. In that case, the
only way to allow user-space access to it would be to mmap() that
range... which means iopl() inb() and outb() on those platforms might
be implemented either as open, readp and writep, respectively, or by
iopl() being open() followed by mmap().

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/