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

Commit e99d7055 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm64: Dump stack for all CPUs on SMP CPU stop"

parents 0f59cfa4 d5f3d734
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -834,11 +834,19 @@ void arch_irq_work_raise(void)
}
#endif

static DEFINE_RAW_SPINLOCK(stop_lock);
/*
 * ipi_cpu_stop - handle IPI from smp_send_stop()
 */
static void ipi_cpu_stop(unsigned int cpu)
{
	if (system_state == SYSTEM_BOOTING ||
	    system_state == SYSTEM_RUNNING) {
		raw_spin_lock(&stop_lock);
		pr_crit("CPU%u: stopping\n", cpu);
		dump_stack();
		raw_spin_unlock(&stop_lock);
	}
	set_cpu_online(cpu, false);

	local_daif_mask();