Re: [PATCH 4/16] TO_PHYS_MASK for loongson2

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

 



On Sun, Apr 15, 2007 at 11:25:53PM +0800, tiansm@xxxxxxxxxx wrote:

> diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
> index 964c5ed..a4d9a07 100644
> --- a/include/asm-mips/addrspace.h
> +++ b/include/asm-mips/addrspace.h
> @@ -145,7 +145,7 @@
>  #define TO_PHYS_MASK	_CONST64_(0x000000ffffffffff)	/* 2^^40 - 1 */
>  #endif
>  
> -#if defined (CONFIG_CPU_R10000)
> +#if defined (CONFIG_CPU_R10000) || defined (CONFIG_CPU_LOONGSON2)
>  #define TO_PHYS_MASK	_CONST64_(0x000000ffffffffff)	/* 2^^40 - 1 */
>  #endif

How about we define TO_PHYS_MASK to 2^57-1 for all processors instead?

The use of TO_PHYS_MASK is to strip of the high bits of of a XKPHYS kernel
virtual address.  Allowing for the top 2 region and 3 cache mode bits that
would leave 59 bits.  If we also allow for the macro to be used for
stripping off the 2 R10000 "uncached attribute" bits we would be down to
57 bits.  Not sure if that would be useful - but we got gobs of address
space to burn and adding yet another #ifdef for every new 64-bit processor
or even variant to addrspace.h isn't really the way to go.

  Ralf


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

  Powered by Linux