Skip to contentSkip to conversation

powerpc/mm/radix: Do slb preload only with hash translation mode

PATCH Applied Aneesh Kumar K.V 3 participants 3 messages Apr 9, 2019 – Apr 21, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mm/radix: Do slb preload only with hash translation mode

Add radix_enabled check to avoid slb preload with radix translation.

---

Without this we result in kernel crash as we move hash related variables out of mm_context_t

 arch/powerpc/kernel/process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/kernel/process.c +2 -1
index dd9e0d5386ee..f7b2e3b3db28 100644
@@ -1729,7 +1729,8 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
 	unsigned long load_addr = regs->gpr[2];	/* saved by ELF_PLAT_INIT */
 
 #ifdef CONFIG_PPC_BOOK3S_64
-	preload_new_slb_context(start, sp);
+	if (!radix_enabled())
+		preload_new_slb_context(start, sp);
 #endif
 #endif
 
Signature · 1 line
2.20.1
reviewer Acked-by on v1 1/1
#1 lore raw

Aneesh Kumar K.V's on April 9, 2019 2:03 pm:

Quoted 3 lines

Add radix_enabled check to avoid slb preload with radix translation.

Quoted 26 lines

---

Without this we result in kernel crash as we move hash related variables out of mm_context_t

 arch/powerpc/kernel/process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/kernel/process.c +2 -1
index dd9e0d5386ee..f7b2e3b3db28 100644
@@ -1729,7 +1729,8 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
 	unsigned long load_addr = regs->gpr[2];	/* saved by ELF_PLAT_INIT */
 
 #ifdef CONFIG_PPC_BOOK3S_64
-	preload_new_slb_context(start, sp);
+	if (!radix_enabled())
+		preload_new_slb_context(start, sp);
 #endif
 #endif
 
Signature · 1 line
2.20.1