Skip to contentSkip to conversation

powerpc: Fix TLB cleanup at boot on POWER8

PATCH New Benjamin Herrenschmidt 1 participant 1 message May 21, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix TLB cleanup at boot on POWER8

The TLB has 512 congruence classes (2048 entries 4 way set associative) while P7 had 128

---
 arch/powerpc/kernel/cpu_setup_power.S |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
arch/powerpc/kernel/cpu_setup_power.S +6 -2
index a283b64..18b5b9c 100644
@@ -135,8 +135,12 @@ __init_HFSCR:
 	blr
 
 __init_TLB:
-	/* Clear the TLB */
-	li	r6,128
+	/*
+	 * Clear the TLB using the "IS 3" form of tlbiel instruction
+	 * (invalidate by congruence class). P7 has 128 CCs, P8 has 512
+	 * so we just always do 512
+	 */
+	li	r6,512
 	mtctr	r6
 	li	r7,0xc00	/* IS field = 0b11 */
 	ptesync