Nope. readb() and vremap() don't mix.
Hmm, that's actually hard to handle. In general "vremap()" is only necessary
on x86 (where we share the processor memory and PCI IO space). On a alpha
(or PPC, or..) you can use "readb()" without any remapping at all, while on a
PC you'd do the vremap() and then directly access the remapped area.
> Something has added 0xc0000000 to the offset.
That's the readb().
Hmm, I think I have an idea.
The readb() (and other macros) right now use __va() to change the address
into a virtual one. But on the x86 we'd actually be better off with a new
"__io()" macro, which instead of adding PAGE_OFFSET would do a logical OR
operation.
Could you test this change:
- in include/asm-i386/io.h, add a macro like this:
#define __io(x) ((void *)(PAGE_ADDRESS | (unsigned long)(x)))
- in the same file, change all uses of "__va" to "__io".
That should make things work, and we can easily make it work on the alpha too
(by making "vremap()" a NULL operation on the alpha, as we don't need any
remapping, and we can just return the original address)
Linus