From: Aneesh Kumar K.V Date: Fri, 29 Apr 2016 13:26:12 +0000 (+1000) Subject: powerpc/mm/radix: Update PTCR on secondary CPUs X-Git-Tag: android-x86-7.1-r1~1454^2~99 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b5dcc6096971b7c11b443b79ae8b69ccb01ec04e;p=android-x86%2Fkernel.git powerpc/mm/radix: Update PTCR on secondary CPUs Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index e6b53cde676e..faaadeff7c1e 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -896,9 +896,13 @@ void __init hash__early_init_mmu(void) void hash__early_init_mmu_secondary(void) { /* Initialize hash table for that CPU */ - if (!firmware_has_feature(FW_FEATURE_LPAR)) - mtspr(SPRN_SDR1, _SDR1); - + if (!firmware_has_feature(FW_FEATURE_LPAR)) { + if (!cpu_has_feature(CPU_FTR_ARCH_300)) + mtspr(SPRN_SDR1, _SDR1); + else + mtspr(SPRN_PTCR, + __pa(partition_tb) | (PATB_SIZE_SHIFT - 12)); + } /* Initialize SLB */ slb_initialize(); }