Commit 7fca4dee authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'powerpc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:
 "One fix for a boot crash on some platforms introduced by the recent
  pkey refactoring.

  Thanks to Christian Zigotzky and Aneesh Kumar K.V"

* tag 'powerpc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000)
parents 0520058d 6553fb79
...@@ -1115,9 +1115,8 @@ void hash__early_init_mmu_secondary(void) ...@@ -1115,9 +1115,8 @@ void hash__early_init_mmu_secondary(void)
&& cpu_has_feature(CPU_FTR_HVMODE)) && cpu_has_feature(CPU_FTR_HVMODE))
tlbiel_all(); tlbiel_all();
#ifdef CONFIG_PPC_MEM_KEYS if (IS_ENABLED(CONFIG_PPC_MEM_KEYS) && mmu_has_feature(MMU_FTR_PKEY))
mtspr(SPRN_UAMOR, default_uamor); mtspr(SPRN_UAMOR, default_uamor);
#endif
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
......
...@@ -73,12 +73,6 @@ static int scan_pkey_feature(void) ...@@ -73,12 +73,6 @@ static int scan_pkey_feature(void)
if (early_radix_enabled()) if (early_radix_enabled())
return 0; return 0;
/*
* Only P7 and above supports SPRN_AMR update with MSR[PR] = 1
*/
if (!early_cpu_has_feature(CPU_FTR_ARCH_206))
return 0;
ret = of_scan_flat_dt(dt_scan_storage_keys, &pkeys_total); ret = of_scan_flat_dt(dt_scan_storage_keys, &pkeys_total);
if (ret == 0) { if (ret == 0) {
/* /*
...@@ -124,6 +118,12 @@ void __init pkey_early_init_devtree(void) ...@@ -124,6 +118,12 @@ void __init pkey_early_init_devtree(void)
__builtin_popcountl(ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT) __builtin_popcountl(ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT)
!= (sizeof(u64) * BITS_PER_BYTE)); != (sizeof(u64) * BITS_PER_BYTE));
/*
* Only P7 and above supports SPRN_AMR update with MSR[PR] = 1
*/
if (!early_cpu_has_feature(CPU_FTR_ARCH_206))
return;
/* scan the device tree for pkey feature */ /* scan the device tree for pkey feature */
pkeys_total = scan_pkey_feature(); pkeys_total = scan_pkey_feature();
if (!pkeys_total) if (!pkeys_total)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment