linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES
@ 2018-03-07 12:15 Aneesh Kumar K.V
  2018-03-30 12:35 ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K.V @ 2018-03-07 12:15 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: linuxppc-dev, Aneesh Kumar K.V

Should not have any impact, because we always select PP_MM_SLICES these days.
Nevertheless it is good to indicate that slb_addr_limit is available only
with slice code.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/mm/slb_low.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
index c66cb06e73a1..337ef162851d 100644
--- a/arch/powerpc/mm/slb_low.S
+++ b/arch/powerpc/mm/slb_low.S
@@ -166,6 +166,8 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
 	 */
 	cmpdi	r9, 0
 	bne-	8f
+
+#ifdef CONFIG_PPC_MM_SLICES
         /*
          * user space make sure we are within the allowed limit
 	 */
@@ -183,7 +185,6 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
 	 * really do dynamic patching unfortunately as processes might flip
 	 * between 4k and 64k standard page size
 	 */
-#ifdef CONFIG_PPC_MM_SLICES
 	/* r10 have esid */
 	cmpldi	r10,16
 	/* below SLICE_LOW_TOP */
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES
  2018-03-07 12:15 [PATCH] powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES Aneesh Kumar K.V
@ 2018-03-30 12:35 ` Michael Ellerman
  2018-03-30 15:07   ` LEROY Christophe
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2018-03-30 12:35 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, Aneesh Kumar K.V

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> Should not have any impact, because we always select PP_MM_SLICES these days.
> Nevertheless it is good to indicate that slb_addr_limit is available only
> with slice code.

That file can only be built if PPC_MM_SLICES=y.

So let's just remove the ifdef entirely.

These days PPC_MM_SLICES == PPC_BOOK3S_64, so we should remove
PPC_MM_SLICES #defines wherever possible and replace them with
PPC_BOOK3S_64 otherwise IMO.

cheers

> diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
> index c66cb06e73a1..337ef162851d 100644
> --- a/arch/powerpc/mm/slb_low.S
> +++ b/arch/powerpc/mm/slb_low.S
> @@ -166,6 +166,8 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
>  	 */
>  	cmpdi	r9, 0
>  	bne-	8f
> +
> +#ifdef CONFIG_PPC_MM_SLICES
>          /*
>           * user space make sure we are within the allowed limit
>  	 */
> @@ -183,7 +185,6 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
>  	 * really do dynamic patching unfortunately as processes might flip
>  	 * between 4k and 64k standard page size
>  	 */
> -#ifdef CONFIG_PPC_MM_SLICES
>  	/* r10 have esid */
>  	cmpldi	r10,16
>  	/* below SLICE_LOW_TOP */
> -- 
> 2.14.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES
  2018-03-30 12:35 ` Michael Ellerman
@ 2018-03-30 15:07   ` LEROY Christophe
  0 siblings, 0 replies; 3+ messages in thread
From: LEROY Christophe @ 2018-03-30 15:07 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, paulus, benh, Aneesh Kumar K.V

Michael Ellerman <mpe@ellerman.id.au> a =C3=A9crit=C2=A0:

> "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
>
>> Should not have any impact, because we always select PP_MM_SLICES=20=20
>>=20these days.
>> Nevertheless it is good to indicate that slb_addr_limit is available onl=
y
>> with slice code.
>
> That file can only be built if PPC_MM_SLICES=3Dy.
>
> So let's just remove the ifdef entirely.
>
> These days PPC_MM_SLICES =3D=3D PPC_BOOK3S_64, so we should remove
> PPC_MM_SLICES #defines wherever possible and replace them with
> PPC_BOOK3S_64 otherwise IMO.

PPC8xx also selects PPC_MM_SLICES when hugepages is selected.

Christophe

>
> cheers
>
>> diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
>> index c66cb06e73a1..337ef162851d 100644
>> --- a/arch/powerpc/mm/slb_low.S
>> +++ b/arch/powerpc/mm/slb_low.S
>> @@ -166,6 +166,8 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
>>  	 */
>>  	cmpdi	r9, 0
>>  	bne-	8f
>> +
>> +#ifdef CONFIG_PPC_MM_SLICES
>>          /*
>>           * user space make sure we are within the allowed limit
>>  	 */
>> @@ -183,7 +185,6 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
>>  	 * really do dynamic patching unfortunately as processes might flip
>>  	 * between 4k and 64k standard page size
>>  	 */
>> -#ifdef CONFIG_PPC_MM_SLICES
>>  	/* r10 have esid */
>>  	cmpldi	r10,16
>>  	/* below SLICE_LOW_TOP */
>> --
>> 2.14.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-30 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07 12:15 [PATCH] powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES Aneesh Kumar K.V
2018-03-30 12:35 ` Michael Ellerman
2018-03-30 15:07   ` LEROY Christophe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).