[Top] [All Lists]

Re: ioremap() and CONFIG_SWAP_IO_SPACE

To: Thomas Koeller <>
Subject: Re: ioremap() and CONFIG_SWAP_IO_SPACE
From: Geert Uytterhoeven <>
Date: Wed, 25 Aug 2004 11:32:06 +0200 (MEST)
Cc: Linux/MIPS Development <>
In-reply-to: <>
Original-recipient: rfc822;
References: <>
On Wed, 25 Aug 2004, Thomas Koeller wrote:
> my platform (PMC-Sierra Yosemite in big endian mode),
> like many others, uses ioremap() to map device
> registers, such as the RM9000's OCD registers.
> To access those registers, the return value of
> ioremap() is casted to a suitable pointer type and
> dereferenced. This of course works, but the return
> value of ioremap() is documented not to be a
> directly dereferenceable pointer value, and accesses
> to ioremapped addresses should be performed using
> the readx/writex APIs.

In theory, ioremap() and readb() and friends are meant for PCI memory space
only. RM9000's OCD registers are not PCI memory space, so there's no strict
guarantee readb() and friends will actually work.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds

<Prev in Thread] Current Thread [Next in Thread>