Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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)

+8 -9
+2 -3
arch/powerpc/mm/book3s64/hash_utils.c
··· 1115 1115 && cpu_has_feature(CPU_FTR_HVMODE)) 1116 1116 tlbiel_all(); 1117 1117 1118 - #ifdef CONFIG_PPC_MEM_KEYS 1119 - mtspr(SPRN_UAMOR, default_uamor); 1120 - #endif 1118 + if (IS_ENABLED(CONFIG_PPC_MEM_KEYS) && mmu_has_feature(MMU_FTR_PKEY)) 1119 + mtspr(SPRN_UAMOR, default_uamor); 1121 1120 } 1122 1121 #endif /* CONFIG_SMP */ 1123 1122
+6 -6
arch/powerpc/mm/book3s64/pkeys.c
··· 73 73 if (early_radix_enabled()) 74 74 return 0; 75 75 76 - /* 77 - * Only P7 and above supports SPRN_AMR update with MSR[PR] = 1 78 - */ 79 - if (!early_cpu_has_feature(CPU_FTR_ARCH_206)) 80 - return 0; 81 - 82 76 ret = of_scan_flat_dt(dt_scan_storage_keys, &pkeys_total); 83 77 if (ret == 0) { 84 78 /* ··· 117 123 BUILD_BUG_ON(__builtin_clzl(ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT) + 118 124 __builtin_popcountl(ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT) 119 125 != (sizeof(u64) * BITS_PER_BYTE)); 126 + 127 + /* 128 + * Only P7 and above supports SPRN_AMR update with MSR[PR] = 1 129 + */ 130 + if (!early_cpu_has_feature(CPU_FTR_ARCH_206)) 131 + return; 120 132 121 133 /* scan the device tree for pkey feature */ 122 134 pkeys_total = scan_pkey_feature();