Re: user space writel() etc. in 2.2.2

Vassili Leonov (vleo@linuxmedialabs.com)
Fri, 5 Mar 1999 09:12:53 -0700 (MST)


On Fri, 5 Mar 1999, Alan Cox wrote:

> > Q: what is the right way to access IO memory under 2.2.2 ?
>
> mmio space by using mmap() as with 2.0, and pc style io space with
> inb inw etc (which are exported with __KERNEL__ not defined)
Sorry, I was wrong in my previous mail. Of course I use mmap() to access
the IO memory space for the board. I want a portable, provided by Linux
libraries equivalent of

((*(volatile unsigned char *) ( base )) = ( v )) ;

before 2.1.3 that was asm/io.h that defined writel(v,base) as such.
Then the #ifdef __KERNEL__ was put around them.

I'm generally speaking amazed - does it mean that nobody wrote any user
(superuser) space I/O code in a clean way since 2.1.3 (which was 1996
BTW)?

#------------------------------------#
| Linux Media Labs LLC | Vassili Leonov
#------------------------------------#
mailto:vleo@linuxmedialabs.com http://linuxmedialabs.com
phone:1-719-231-3173

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/