[PATCH 2/6] powerpc/mm/radix: Update PID switch sequence

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Thu May 19 17:54:28 AEST 2016


Update the PID switch as per ISA doc. slbia is needed in radix to
invalidate any implementation specific lookaside information

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
---
 arch/powerpc/mm/mmu_context_book3s64.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c
index 227b2a6c4544..565f1b1da33b 100644
--- a/arch/powerpc/mm/mmu_context_book3s64.c
+++ b/arch/powerpc/mm/mmu_context_book3s64.c
@@ -181,7 +181,10 @@ void destroy_context(struct mm_struct *mm)
 #ifdef CONFIG_PPC_RADIX_MMU
 void radix__switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
 {
-	mtspr(SPRN_PID, next->context.id);
 	asm volatile("isync": : :"memory");
+	mtspr(SPRN_PID, next->context.id);
+	asm volatile("isync \n"
+		     "slbia 0x7 \n"
+		     : : :"memory");
 }
 #endif
-- 
2.7.4



More information about the Linuxppc-dev mailing list