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

Pull powerpc fixes from Madhavan Srinivasan:

- Fix for kexec warning due to SMT disable or partial SMT enabled

- Handle font bitmap pointer with reloc_offset to fix boot crash

- Fix to enable cpuidle state for Power11

- Couple of misc fixes

Thanks to Aboorva Devarajan, Aditya Bodkhe, Cedar Maxwell, Christian
Zigotzky, Christophe Leroy, Christophe Leroy (CS GROUP), Finn Thain,
Gopi Krishna Menon, Guenter Roeck, Jan Stancek, Joe Lawrence, Josh
Poimboeuf, Justin M. Forbes, Madadi Vineeth Reddy, Naveen N Rao (AMD),
Nysal Jan K.A., Sachin P Bappalige, Samir M, Sourabh Jain, Srikar
Dronamraju, and Stan Johnson

* tag 'powerpc-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/32: Restore disabling of interrupts at interrupt/syscall exit
powerpc/powernv: Enable cpuidle state detection for POWER11
powerpc: Add reloc_offset() to font bitmap pointer used for bootx_printf()
powerpc/tools: drop `-o pipefail` in gcc check scripts
selftests/powerpc/pmu/: Add check_extended_reg_test to .gitignore
powerpc/kexec: Enable SMT before waking offline CPUs

Changed files
+33 -24
arch
tools
testing
selftests
powerpc
pmu
sampling_tests
+1 -1
arch/powerpc/include/asm/hw_irq.h
··· 90 90 if (IS_ENABLED(CONFIG_BOOKE)) 91 91 wrtee(0); 92 92 else if (IS_ENABLED(CONFIG_PPC_8xx)) 93 - wrtspr(SPRN_NRI); 93 + wrtspr_sync(SPRN_NRI); 94 94 else if (IS_ENABLED(CONFIG_PPC_BOOK3S_64)) 95 95 __mtmsrd(0, 1); 96 96 else
+1
arch/powerpc/include/asm/reg.h
··· 1400 1400 : "r" ((unsigned long)(v)) \ 1401 1401 : "memory") 1402 1402 #define wrtspr(rn) asm volatile("mtspr " __stringify(rn) ",2" : : : "memory") 1403 + #define wrtspr_sync(rn) asm volatile("mtspr " __stringify(rn) ",2; sync" : : : "memory") 1403 1404 1404 1405 static inline void wrtee(unsigned long val) 1405 1406 {
+2 -1
arch/powerpc/kernel/btext.c
··· 20 20 #include <asm/io.h> 21 21 #include <asm/processor.h> 22 22 #include <asm/udbg.h> 23 + #include <asm/setup.h> 23 24 24 25 #define NO_SCROLL 25 26 ··· 464 463 { 465 464 unsigned char *base = calc_base(locX << 3, locY << 4); 466 465 unsigned int font_index = c * 16; 467 - const unsigned char *font = font_sun_8x16.data + font_index; 466 + const unsigned char *font = PTRRELOC(font_sun_8x16.data) + font_index; 468 467 int rb = dispDeviceRowBytes; 469 468 470 469 rmci_maybe_on();
-15
arch/powerpc/kernel/entry_32.S
··· 101 101 .endm 102 102 #endif 103 103 104 - .macro clr_ri trash 105 - #ifndef CONFIG_BOOKE 106 - #ifdef CONFIG_PPC_8xx 107 - mtspr SPRN_NRI, \trash 108 - #else 109 - li \trash, MSR_KERNEL & ~MSR_RI 110 - mtmsr \trash 111 - #endif 112 - #endif 113 - .endm 114 - 115 104 .globl transfer_to_syscall 116 105 transfer_to_syscall: 117 106 stw r3, ORIG_GPR3(r1) ··· 149 160 cmpwi r3,0 150 161 REST_GPR(3, r1) 151 162 syscall_exit_finish: 152 - clr_ri r4 153 163 mtspr SPRN_SRR0,r7 154 164 mtspr SPRN_SRR1,r8 155 165 ··· 225 237 /* Clear the exception marker on the stack to avoid confusing stacktrace */ 226 238 li r10, 0 227 239 stw r10, 8(r11) 228 - clr_ri r10 229 240 mtspr SPRN_SRR1,r9 230 241 mtspr SPRN_SRR0,r12 231 242 REST_GPR(9, r11) ··· 257 270 .Lfast_user_interrupt_return: 258 271 lwz r11,_NIP(r1) 259 272 lwz r12,_MSR(r1) 260 - clr_ri r4 261 273 mtspr SPRN_SRR0,r11 262 274 mtspr SPRN_SRR1,r12 263 275 ··· 299 313 cmpwi cr1,r3,0 300 314 lwz r11,_NIP(r1) 301 315 lwz r12,_MSR(r1) 302 - clr_ri r4 303 316 mtspr SPRN_SRR0,r11 304 317 mtspr SPRN_SRR1,r12 305 318
+4 -1
arch/powerpc/kernel/interrupt.c
··· 38 38 #else 39 39 static inline bool exit_must_hard_disable(void) 40 40 { 41 - return false; 41 + return true; 42 42 } 43 43 #endif 44 44 ··· 443 443 444 444 if (unlikely(stack_store)) 445 445 __hard_EE_RI_disable(); 446 + #else 447 + } else { 448 + __hard_EE_RI_disable(); 446 449 #endif /* CONFIG_PPC64 */ 447 450 } 448 451
+19
arch/powerpc/kexec/core_64.c
··· 202 202 mb(); 203 203 } 204 204 205 + 206 + /* 207 + * The add_cpu() call in wake_offline_cpus() can fail as cpu_bootable() 208 + * returns false for CPUs that fail the cpu_smt_thread_allowed() check 209 + * or non primary threads if SMT is disabled. Re-enable SMT and set the 210 + * number of SMT threads to threads per core. 211 + */ 212 + static void kexec_smt_reenable(void) 213 + { 214 + #if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT) 215 + lock_device_hotplug(); 216 + cpu_smt_num_threads = threads_per_core; 217 + cpu_smt_control = CPU_SMT_ENABLED; 218 + unlock_device_hotplug(); 219 + #endif 220 + } 221 + 205 222 /* 206 223 * We need to make sure each present CPU is online. The next kernel will scan 207 224 * the device tree and assume primary threads are online and query secondary ··· 232 215 static void wake_offline_cpus(void) 233 216 { 234 217 int cpu = 0; 218 + 219 + kexec_smt_reenable(); 235 220 236 221 for_each_present_cpu(cpu) { 237 222 if (!cpu_online(cpu)) {
+5 -4
arch/powerpc/platforms/powernv/idle.c
··· 1171 1171 u64 max_residency_ns = 0; 1172 1172 int i; 1173 1173 1174 - /* stop is not really architected, we only have p9,p10 drivers */ 1175 - if (!pvr_version_is(PVR_POWER10) && !pvr_version_is(PVR_POWER9)) 1174 + /* stop is not really architected, we only have p9,p10 and p11 drivers */ 1175 + if (!pvr_version_is(PVR_POWER9) && !pvr_version_is(PVR_POWER10) && 1176 + !pvr_version_is(PVR_POWER11)) 1176 1177 return; 1177 1178 1178 1179 /* ··· 1190 1189 struct pnv_idle_states_t *state = &pnv_idle_states[i]; 1191 1190 u64 psscr_rl = state->psscr_val & PSSCR_RL_MASK; 1192 1191 1193 - /* No deep loss driver implemented for POWER10 yet */ 1194 - if (pvr_version_is(PVR_POWER10) && 1192 + /* No deep loss driver implemented for POWER10 and POWER11 yet */ 1193 + if ((pvr_version_is(PVR_POWER10) || pvr_version_is(PVR_POWER11)) && 1195 1194 state->flags & (OPAL_PM_TIMEBASE_STOP|OPAL_PM_LOSE_FULL_CONTEXT)) 1196 1195 continue; 1197 1196
-1
arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh
··· 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 4 4 set -e 5 - set -o pipefail 6 5 7 6 # To debug, uncomment the following line 8 7 # set -x
-1
arch/powerpc/tools/gcc-check-mprofile-kernel.sh
··· 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 4 4 set -e 5 - set -o pipefail 6 5 7 6 # To debug, uncomment the following line 8 7 # set -x
+1
tools/testing/selftests/powerpc/pmu/sampling_tests/.gitignore
··· 1 1 bhrb_filter_map_test 2 2 bhrb_no_crash_wo_pmu_test 3 + check_extended_reg_test 3 4 intr_regs_no_crash_wo_pmu_test 4 5 mmcr0_cc56run_test 5 6 mmcr0_exceptionbits_test