diff options
author | Leo Yan <leo.yan@linaro.org> | 2018-08-23 10:25:52 +0800 |
---|---|---|
committer | Leo Yan <leo.yan@linaro.org> | 2018-08-23 10:25:52 +0800 |
commit | 805b2f4347fdaff6529234cf128d2da8ecbd18f8 (patch) | |
tree | ad00603ea30991342a1b60c7a1adceedfae79f6c | |
parent | 79786fdd32a85556d535cdc41151f2e0cac5d1ac (diff) |
arm64: kdump: Avoid to power off nonpanic CPUscsdump_20180821_juno
commit a88ce63b642c ("arm64: kexec: have own crash_smp_send_stop() for
crash dump for nonpanic cores") introduces ARM64 architecture function
crash_smp_send_stop() to replace the weak function, this results in
the nonpanic CPUs to be hot-plugged out and CPUs are placed into low
power state on ARM64 platforms with the flow:
Panic CPU:
machine_crash_shutdown()
crash_smp_send_stop()
smp_cross_call(&mask, IPI_CPU_CRASH_STOP)
Nonpanic CPUs:
handle_IPI()
ipi_cpu_crash_stop()
cpu_ops[cpu]->cpu_die()
The upper patch has no issue if enabled crash dump only; but if enabled
crash dump and Coresight debug module for panic dumping at the meantime,
nonpanic CPUs are powered off in crash dump flow, later this may
introduce conflicts with the Coresight debug module because Coresight
debug registers dumping requires the CPU must be powered on for some
platforms (e.g. Hi6220 on Hikey board). If we cannot keep the CPUs
powered on, we can see the hardware lockup issue when access Coresight
debug registers.
To fix this issue, this commit bypasses CPU hotplug operation in func
crash_smp_send_stop() when coresight CPU debug module has been enabled
and let CPUs to run into WFE/WFI states so CPUs can still be powered on
after crash dump. This finally is more safe for Coresight debug module
to dump registers and avoid hardware lockup.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
-rw-r--r-- | arch/arm64/kernel/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 25fcd22a4bb24..f4349b08a8b4d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -374,7 +374,7 @@ void cpu_die_early(void) /* Mark this CPU absent */ set_cpu_present(cpu, 0); -#ifdef CONFIG_HOTPLUG_CPU +#if defined(CONFIG_HOTPLUG_CPU) && !defined(CONFIG_CORESIGHT_CPU_DEBUG) update_cpu_boot_status(CPU_KILL_ME); /* Check if we can park ourselves */ if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_die) |