powerpc/mm/radix: Do slb preload only with hash translation mode
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.
Signed-off-by Aneesh Kumar K.V <[email protected]>
---
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
@@ -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
Aneesh Kumar K.V's on April 9, 2019 2:03 pm:
Quoted 3 lines
Add
radix_enabledcheck to avoid slb preload with radix translation.Signed-off-by Aneesh Kumar K.V <[email protected]>
Acked-by Nicholas Piggin <[email protected]>
Quoted 26 lines
---
Without this we result in kernel crash as we move hash related variables out of
mm_context_tarch/powerpc/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/powerpc/kernel/process.c +2
-1@@ -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
Michael Ellerman
AppliedQuoted 4 lines · Aneesh Kumar K.V
Add
radix_enabledcheck to avoid slb preload with radix translation.Signed-off-by Aneesh Kumar K.V <[email protected]>Acked-by Nicholas Piggin <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/f89bd8ba834e392ff614a7be9ee68c56
cheers