Re: [PATCH 1/5] Make __pa() uses CPHYSADDR() if really needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux