Commit 0a3221b6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 2f111a6f 787252a1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -126,14 +126,16 @@ _GLOBAL(idle_return_gpr_loss)
/*
 * This is the sequence required to execute idle instructions, as
 * specified in ISA v2.07 (and earlier). MSR[IR] and MSR[DR] must be 0.
 *
 * The 0(r1) slot is used to save r2 in isa206, so use that here.
 * We have to store a GPR somewhere, ptesync, then reload it, and create
 * a false dependency on the result of the load. It doesn't matter which
 * GPR we store, or where we store it. We have already stored r2 to the
 * stack at -8(r1) in isa206_idle_insn_mayloss, so use that.
 */
#define IDLE_STATE_ENTER_SEQ_NORET(IDLE_INST)			\
	/* Magic NAP/SLEEP/WINKLE mode enter sequence */	\
	std	r2,0(r1);					\
	std	r2,-8(r1);					\
	ptesync;						\
	ld	r2,0(r1);					\
	ld	r2,-8(r1);					\
236:	cmpd	cr0,r2,r2;					\
	bne	236b;						\
	IDLE_INST;						\
+0 −2
Original line number Diff line number Diff line
@@ -1730,8 +1730,6 @@ void __cpu_die(unsigned int cpu)

void arch_cpu_idle_dead(void)
{
	sched_preempt_enable_no_resched();

	/*
	 * Disable on the down path. This will be re-enabled by
	 * start_secondary() via start_secondary_resume() below