On Wed, 11 Oct 2006 14:08:41 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote: > -#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) > +#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64) > +#define __pa(x) CPHYSADDR(x) > +#else > +#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) > +#endif > #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) Please do not do this. CONFIG_BUILD_ELF64=n does not mean we only have less then 512MB memory. We can have large flat area at PAGE_OFFSET (0x9800000000000000) in 64-bit kernel, so __pa() should accepct a value such as 0x9800000020000000. --- Atsushi Nemoto