From: Benjamin Herrenschmidt Date: Mon, 20 May 2013 17:23:22 +0000 (+0000) Subject: powerpc: Fix TLB cleanup at boot on POWER8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8fc1f5d7eff9a4ed0cdb7215e7ca4b82b931d6d7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S index a283b6442b26..18b5b9cf8e37 100644 --- a/arch/powerpc/kernel/cpu_setup_power.S +++ b/arch/powerpc/kernel/cpu_setup_power.S @@ -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