[COMMON] arm64: smp: recall to print other cpu information
authorHosung Kim <hosung0.kim@samsung.com>
Tue, 11 Apr 2017 10:12:30 +0000 (19:12 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Fri, 29 Jun 2018 09:17:38 +0000 (18:17 +0900)
This commit reverts following commits it is already merged.
arm64: Reduce verbosity on SMP CPU stop by Jab Glauber.

In mobile, this information is very important to debug.

Change-Id: I1ca149608d70903675b7ff0a98c206e339b45e1e
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
arch/arm64/kernel/smp.c

index 6a8dc4d33f2eada8c6fa4bb3a1462ff323f1e14d..f1cf3634ade74fb6b813f95f7760a2f30ffb6691 100644 (file)
@@ -832,11 +832,21 @@ 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, struct pt_regs *regs)
 {
+       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_irq_disable();