Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea925a72 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Ralf Baechle
Browse files

MIPS: smp: Make stop_this_cpu() actually stop the CPU



Since cpu_wait() enables interrupts upon return, CPUs which have
entered stop_this_cpu() may still end up handling interrupts.
This can lead to the softlockup detector firing on a panic or
restart/poweroff/halt.  Just disable interrupts and spin to ensure
nothing else runs on the CPU once it has entered stop_this_cpu().

Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9601/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent c1bed31f
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -176,10 +176,8 @@ static void stop_this_cpu(void *dummy)
	 * Remove this CPU:
	 * Remove this CPU:
	 */
	 */
	set_cpu_online(smp_processor_id(), false);
	set_cpu_online(smp_processor_id(), false);
	for (;;) {
	local_irq_disable();
		if (cpu_wait)
	while (1);
			(*cpu_wait)();		/* Wait if available. */
	}
}
}


void smp_send_stop(void)
void smp_send_stop(void)