Commit 8fc1f5d7eff9a4ed0cdb7215e7ca4b82b931d6d7

Authored by Benjamin Herrenschmidt
1 parent 1ad936e850

powerpc: Fix TLB cleanup at boot on POWER8

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

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff

arch/powerpc/kernel/cpu_setup_power.S
... ... @@ -135,8 +135,12 @@
135 135 blr
136 136  
137 137 __init_TLB:
138   - /* Clear the TLB */
139   - li r6,128
  138 + /*
  139 + * Clear the TLB using the "IS 3" form of tlbiel instruction
  140 + * (invalidate by congruence class). P7 has 128 CCs, P8 has 512
  141 + * so we just always do 512
  142 + */
  143 + li r6,512
140 144 mtctr r6
141 145 li r7,0xc00 /* IS field = 0b11 */
142 146 ptesync