On Fri, 13 Oct 2006 14:39:01 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote: > -#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) > -#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) > +#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64) > +#define __page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0) > +#else > +#define __page_offset(x) PAGE_OFFSET > +#endif > +#define __pa(x) ((unsigned long)(x) - __page_offset(x)) > +#define __va(x) ((void *)((unsigned long)(x) + __page_offset(x))) In __va(), you are passing an physical address to __page_offset(). --- Atsushi Nemoto