Skip to content

Commit 0a3221b

Browse files
committed
Merge tag 'powerpc-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Fix a bug exposed by a previous fix, where running guests with certain SMT topologies could crash the host on Power8. - Fix atomic sleep warnings when re-onlining CPUs, when PREEMPT is enabled. Thanks to Nathan Lynch, Srikar Dronamraju, and Valentin Schneider. * tag 'powerpc-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/smp: do not decrement idle task preempt count in CPU offline powerpc/idle: Don't corrupt back chain when going idle
2 parents 2f111a6 + 787252a commit 0a3221b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

arch/powerpc/kernel/idle_book3s.S

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,16 @@ _GLOBAL(idle_return_gpr_loss)
126126
/*
127127
* This is the sequence required to execute idle instructions, as
128128
* specified in ISA v2.07 (and earlier). MSR[IR] and MSR[DR] must be 0.
129-
*
130-
* The 0(r1) slot is used to save r2 in isa206, so use that here.
129+
* We have to store a GPR somewhere, ptesync, then reload it, and create
130+
* a false dependency on the result of the load. It doesn't matter which
131+
* GPR we store, or where we store it. We have already stored r2 to the
132+
* stack at -8(r1) in isa206_idle_insn_mayloss, so use that.
131133
*/
132134
#define IDLE_STATE_ENTER_SEQ_NORET(IDLE_INST) \
133135
/* Magic NAP/SLEEP/WINKLE mode enter sequence */ \
134-
std r2,0(r1); \
136+
std r2,-8(r1); \
135137
ptesync; \
136-
ld r2,0(r1); \
138+
ld r2,-8(r1); \
137139
236: cmpd cr0,r2,r2; \
138140
bne 236b; \
139141
IDLE_INST; \

arch/powerpc/kernel/smp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,8 +1730,6 @@ void __cpu_die(unsigned int cpu)
17301730

17311731
void arch_cpu_idle_dead(void)
17321732
{
1733-
sched_preempt_enable_no_resched();
1734-
17351733
/*
17361734
* Disable on the down path. This will be re-enabled by
17371735
* start_secondary() via start_secondary_resume() below

0 commit comments

Comments
 (0)