Re: linux-kernel-digest V1 #124

Rob Janssen reading Linux mailinglist (
Sat, 22 Jul 1995 23:29:25 +0200 (MET DST)

According to
> From: friebe@xvnews.unconfigured.domain (Bernhard Friebe Student (SV S.N J.L))
> Date: 19 Jul 1995 15:34:58 GMT
> Subject: 16-bit read/write operations on ISA bus
> Hi folks,
> I'm new to this newsgroup (and Linux), and not shure if this question really belongs here, but anyway here it comes:
> I am trying to comunicate with a custom pc board with help of the linux provided
> device /dev/port and the open/write/read operations. However these are 8-bits (char) only (that's what I think) and I need to perform 16-bit operations.
> I'm aware that there are existing operations like outb, inb, ... for direct ISA-bus
> comunication, but unfortunately I have no information which file I have to include
> in my C source or in which files these operations are defined (if I include io.h,
> where a definition of inb, outb, ... is given, the internal functions __outb, __inb, ... are unknown on compilation).
> I'm aware that this is a really unprecise question, but I would be very happy if
> anyone could give me some help.

One thing that is unclear to many users of inb/outb/etc is that you need
to compile with -O2 (optimization) to force GCC to expand the inline
functions __outb etc. If you don't, they will be undefined.
(I think there is also a specific flag to enable only this expansion and
don't do optimization. see the GCC docs)


| Rob Janssen | AMPRnet:       |
| e-mail: | AX.25 BBS: PE1CHL@PI8WNO.#UTR.NLD.EU |