Skip to content

Commit 7170d5d

Browse files
Automatic merge of 'fixes' into merge (2025-12-25 15:23)
2 parents 125aa52 + 608328b commit 7170d5d

File tree

10 files changed

+33
-24
lines changed

10 files changed

+33
-24
lines changed

arch/powerpc/include/asm/hw_irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static inline void __hard_EE_RI_disable(void)
9090
if (IS_ENABLED(CONFIG_BOOKE))
9191
wrtee(0);
9292
else if (IS_ENABLED(CONFIG_PPC_8xx))
93-
wrtspr(SPRN_NRI);
93+
wrtspr_sync(SPRN_NRI);
9494
else if (IS_ENABLED(CONFIG_PPC_BOOK3S_64))
9595
__mtmsrd(0, 1);
9696
else

arch/powerpc/include/asm/reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,7 @@ static inline void mtmsr_isync(unsigned long val)
14001400
: "r" ((unsigned long)(v)) \
14011401
: "memory")
14021402
#define wrtspr(rn) asm volatile("mtspr " __stringify(rn) ",2" : : : "memory")
1403+
#define wrtspr_sync(rn) asm volatile("mtspr " __stringify(rn) ",2; sync" : : : "memory")
14031404

14041405
static inline void wrtee(unsigned long val)
14051406
{

arch/powerpc/kernel/btext.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <asm/io.h>
2121
#include <asm/processor.h>
2222
#include <asm/udbg.h>
23+
#include <asm/setup.h>
2324

2425
#define NO_SCROLL
2526

@@ -463,7 +464,7 @@ static noinline void draw_byte(unsigned char c, long locX, long locY)
463464
{
464465
unsigned char *base = calc_base(locX << 3, locY << 4);
465466
unsigned int font_index = c * 16;
466-
const unsigned char *font = font_sun_8x16.data + font_index;
467+
const unsigned char *font = PTRRELOC(font_sun_8x16.data) + font_index;
467468
int rb = dispDeviceRowBytes;
468469

469470
rmci_maybe_on();

arch/powerpc/kernel/entry_32.S

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,6 @@ SYM_FUNC_END(__kuep_unlock)
101101
.endm
102102
#endif
103103

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-
115104
.globl transfer_to_syscall
116105
transfer_to_syscall:
117106
stw r3, ORIG_GPR3(r1)
@@ -160,7 +149,6 @@ ret_from_syscall:
160149
cmpwi r3,0
161150
REST_GPR(3, r1)
162151
syscall_exit_finish:
163-
clr_ri r4
164152
mtspr SPRN_SRR0,r7
165153
mtspr SPRN_SRR1,r8
166154

@@ -237,7 +225,6 @@ fast_exception_return:
237225
/* Clear the exception marker on the stack to avoid confusing stacktrace */
238226
li r10, 0
239227
stw r10, 8(r11)
240-
clr_ri r10
241228
mtspr SPRN_SRR1,r9
242229
mtspr SPRN_SRR0,r12
243230
REST_GPR(9, r11)
@@ -270,7 +257,6 @@ interrupt_return:
270257
.Lfast_user_interrupt_return:
271258
lwz r11,_NIP(r1)
272259
lwz r12,_MSR(r1)
273-
clr_ri r4
274260
mtspr SPRN_SRR0,r11
275261
mtspr SPRN_SRR1,r12
276262

@@ -313,7 +299,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
313299
cmpwi cr1,r3,0
314300
lwz r11,_NIP(r1)
315301
lwz r12,_MSR(r1)
316-
clr_ri r4
317302
mtspr SPRN_SRR0,r11
318303
mtspr SPRN_SRR1,r12
319304

arch/powerpc/kernel/interrupt.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static inline bool exit_must_hard_disable(void)
3838
#else
3939
static inline bool exit_must_hard_disable(void)
4040
{
41-
return false;
41+
return true;
4242
}
4343
#endif
4444

@@ -443,6 +443,9 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs)
443443

444444
if (unlikely(stack_store))
445445
__hard_EE_RI_disable();
446+
#else
447+
} else {
448+
__hard_EE_RI_disable();
446449
#endif /* CONFIG_PPC64 */
447450
}
448451

arch/powerpc/kexec/core_64.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,23 @@ static void kexec_prepare_cpus_wait(int wait_state)
202202
mb();
203203
}
204204

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+
205222
/*
206223
* We need to make sure each present CPU is online. The next kernel will scan
207224
* the device tree and assume primary threads are online and query secondary
@@ -216,6 +233,8 @@ static void wake_offline_cpus(void)
216233
{
217234
int cpu = 0;
218235

236+
kexec_smt_reenable();
237+
219238
for_each_present_cpu(cpu) {
220239
if (!cpu_online(cpu)) {
221240
printk(KERN_INFO "kexec: Waking offline cpu %d.\n",

arch/powerpc/platforms/powernv/idle.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,9 @@ static void __init pnv_arch300_idle_init(void)
11711171
u64 max_residency_ns = 0;
11721172
int i;
11731173

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))
11761177
return;
11771178

11781179
/*
@@ -1189,8 +1190,8 @@ static void __init pnv_arch300_idle_init(void)
11891190
struct pnv_idle_states_t *state = &pnv_idle_states[i];
11901191
u64 psscr_rl = state->psscr_val & PSSCR_RL_MASK;
11911192

1192-
/* No deep loss driver implemented for POWER10 yet */
1193-
if (pvr_version_is(PVR_POWER10) &&
1193+
/* No deep loss driver implemented for POWER10 and POWER11 yet */
1194+
if ((pvr_version_is(PVR_POWER10) || pvr_version_is(PVR_POWER11)) &&
11941195
state->flags & (OPAL_PM_TIMEBASE_STOP|OPAL_PM_LOSE_FULL_CONTEXT))
11951196
continue;
11961197

arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# SPDX-License-Identifier: GPL-2.0
33

44
set -e
5-
set -o pipefail
65

76
# To debug, uncomment the following line
87
# set -x

arch/powerpc/tools/gcc-check-mprofile-kernel.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# SPDX-License-Identifier: GPL-2.0
33

44
set -e
5-
set -o pipefail
65

76
# To debug, uncomment the following line
87
# set -x

tools/testing/selftests/powerpc/pmu/sampling_tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
bhrb_filter_map_test
22
bhrb_no_crash_wo_pmu_test
3+
check_extended_reg_test
34
intr_regs_no_crash_wo_pmu_test
45
mmcr0_cc56run_test
56
mmcr0_exceptionbits_test

0 commit comments

Comments
 (0)