Skip to content

Commit cac4a18

Browse files
kvaneeshmpe
authored andcommitted
powerpc/mm: Fix missing update of HID register on secondary CPUs
We need to update on secondaries for the selected MMU mode. Fixes: ad41067 ("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>
1 parent 96ed1fe commit cac4a18

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

arch/powerpc/mm/hash_utils_64.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,10 @@ void hash__early_init_mmu_secondary(void)
10291029
{
10301030
/* Initialize hash table for that CPU */
10311031
if (!firmware_has_feature(FW_FEATURE_LPAR)) {
1032+
1033+
if (cpu_has_feature(CPU_FTR_POWER9_DD1))
1034+
update_hid_for_hash();
1035+
10321036
if (!cpu_has_feature(CPU_FTR_ARCH_300))
10331037
mtspr(SPRN_SDR1, _SDR1);
10341038
else

arch/powerpc/mm/pgtable-radix.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ void radix__early_init_mmu_secondary(void)
388388
* update partition table control register and UPRT
389389
*/
390390
if (!firmware_has_feature(FW_FEATURE_LPAR)) {
391+
392+
if (cpu_has_feature(CPU_FTR_POWER9_DD1))
393+
update_hid_for_radix();
394+
391395
lpcr = mfspr(SPRN_LPCR);
392396
mtspr(SPRN_LPCR, lpcr | LPCR_UPRT | LPCR_HR);
393397

0 commit comments

Comments
 (0)