powerpc/mm: Fix missing update of HID register on secondary CPUs
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 17 Nov 2016 10:16:23 +0000 (15:46 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 Nov 2016 12:16:58 +0000 (23:16 +1100)
We need to update on secondaries for the selected MMU mode.

Fixes: ad410674f560 ("powerpc/mm: Update the HID bit when switching from radix to hash")
Reported-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/pgtable-radix.c

index 44d3c3a38e3ecc71c779b4a09f07e2c12261a99b..5503078090cd9ee7e34c1315506e09e9fe361391 100644 (file)
@@ -1029,6 +1029,10 @@ void hash__early_init_mmu_secondary(void)
 {
        /* Initialize hash table for that CPU */
        if (!firmware_has_feature(FW_FEATURE_LPAR)) {
+
+               if (cpu_has_feature(CPU_FTR_POWER9_DD1))
+                       update_hid_for_hash();
+
                if (!cpu_has_feature(CPU_FTR_ARCH_300))
                        mtspr(SPRN_SDR1, _SDR1);
                else
index ed7bddc456b72b5a7ce1b647438cd2271306302a..688b54517655f1ef787023f18f3cacdcbd62ba3b 100644 (file)
@@ -388,6 +388,10 @@ void radix__early_init_mmu_secondary(void)
         * update partition table control register and UPRT
         */
        if (!firmware_has_feature(FW_FEATURE_LPAR)) {
+
+               if (cpu_has_feature(CPU_FTR_POWER9_DD1))
+                       update_hid_for_radix();
+
                lpcr = mfspr(SPRN_LPCR);
                mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR);