Skip to contentSkip to conversation

powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES

PATCH In review Aneesh Kumar K.V 3 participants 3 messages Mar 7, 2018 – Mar 30, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES

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.

---
 arch/powerpc/mm/slb_low.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/mm/slb_low.S +2 -1
index c66cb06e73a1..337ef162851d 100644
@@ -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 */
Signature · 1 line
2.14.3
#1 lore raw
Quoted 3 lines · 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.

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

Quoted 23 lines
arch/powerpc/mm/slb_low.S +2 -1
index c66cb06e73a1..337ef162851d 100644
@@ -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 */
Signature · 1 line
2.14.3
#2 lore raw

Michael Ellerman <[email protected]> a =C3=A9crit=C2=A0:

Quoted 5 lines
Quoted 3 lines · Aneesh Kumar K.V

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

Quoted 9 lines
Quoted 1 line

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

Quoted 26 lines

cheers

Quoted 23 lines
arch/powerpc/mm/slb_low.S +2 -2
index c66cb06e73a1..337ef162851d 100644
@@ -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