arm64: smp: Treat unknown boot failures as being 'stuck in kernel'
authorWill Deacon <will@kernel.org>
Tue, 27 Aug 2019 14:54:56 +0000 (15:54 +0100)
committerWill Deacon <will@kernel.org>
Tue, 27 Aug 2019 16:37:05 +0000 (17:37 +0100)
When we fail to bring a secondary CPU online and it fails in an unknown
state, we should assume the worst and increment 'cpus_stuck_in_kernel'
so that things like kexec() are disabled.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/smp.c

index 1f8aeb77cba59f982c8ba443b29986e274cfbc73..dc9fe879c27932ef413dc99df73f39994855f052 100644 (file)
@@ -147,6 +147,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
                default:
                        pr_err("CPU%u: failed in unknown state : 0x%lx\n",
                                        cpu, status);
+                       cpus_stuck_in_kernel++;
                        break;
                case CPU_KILL_ME:
                        if (!op_cpu_kill(cpu)) {