Re[2]: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Phileas Fogg
> >Ok. How about the below patch. This is based on the suggestion from >Paulus. I still have to take care of few comments in the code. > >We now split the proto-vsid range differently. > User: 0 to [2^(CONTEXT_BITS) - 4 + 2^(USER_ESID_BITS)] > kernel: [2^(CONTEXT_BITS) - 4 + 2^(USER_ESID_BITS)]

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Geoff Levand
Hi Aneesh, On Wed, 2013-02-13 at 17:10 +0530, Aneesh Kumar K.V wrote: > Ok. How about the below patch. This is based on the suggestion from > Paulus. I still have to take care of few comments in the code. > > Phileas and Geoff, > > Can we check whether this fix the PS3 boot hang ? I did a quick

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > David Laight writes: > >>> +#define CONTEXT_BITS 19 >>> +#define USER_ESID_BITS 18 >>> +#define USER_ESID_BITS_1T 6 >>> + >>> +/* >>> + * 256MB segment >>> + * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments >>> + * a

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Aneesh Kumar K.V
David Laight writes: >> +#define CONTEXT_BITS19 >> +#define USER_ESID_BITS 18 >> +#define USER_ESID_BITS_1T 6 >> + >> +/* >> + * 256MB segment >> + * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments >> + * available for user + kernel mapping. T

RE: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread David Laight
> +#define CONTEXT_BITS 19 > +#define USER_ESID_BITS 18 > +#define USER_ESID_BITS_1T6 > + > +/* > + * 256MB segment > + * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments > + * available for user + kernel mapping. The top 4 contexts are used for > + *

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-13 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Wed, 2013-02-13 at 08:54 +0530, Aneesh Kumar K.V wrote: >> > A compile option ? Really ? Ugh... >> >> I actually wanted that to be done in Kconfig.cputype, but haven't found >> a nice way to do it. Considering we are switching between only two >> values, I was

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-12 Thread Benjamin Herrenschmidt
On Wed, 2013-02-13 at 08:54 +0530, Aneesh Kumar K.V wrote: > > A compile option ? Really ? Ugh... > > I actually wanted that to be done in Kconfig.cputype, but haven't found > a nice way to do it. Considering we are switching between only two > values, I was thinking an #ifdef would work. No, we

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-12 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Wed, 2013-02-13 at 00:01 +0530, Aneesh Kumar K.V wrote: >> + * Be careful with this value. This determines the VSID_MODULUS_* and that >> + * need to be co-prime with VSID_MULTIPLIER* >> + */ >> +#if defined(CONFIG_POWER6_CPU) || defined(CONFIG_POWER7_CPU) >>

Re: [PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-12 Thread Benjamin Herrenschmidt
On Wed, 2013-02-13 at 00:01 +0530, Aneesh Kumar K.V wrote: > + * Be careful with this value. This determines the VSID_MODULUS_* and that > + * need to be co-prime with VSID_MULTIPLIER* > + */ > +#if defined(CONFIG_POWER6_CPU) || defined(CONFIG_POWER7_CPU) > +/* > + * Even if cpu support 68 bits, w

[PATCH 2/2] powerpc: Make context bits depend on virtual addr size.

2013-02-12 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" Different platforms supports different virtual addr size(n bits). We need to mak sure 0:77-n bits of the VA generated is forced to zero. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/mmu-hash64.h | 22 +- 1 file changed, 21 inserti