Skip to content

Commit

Permalink
powerpc/mm: Fix missing update of HID register on secondary CPUs
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
kvaneesh authored and mpe committed Nov 18, 2016
1 parent 96ed1fe commit cac4a18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/mm/pgtable-radix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit cac4a18

Please sign in to comment.