From: Suzuki K Poulose Date: Mon, 10 Dec 2018 18:07:33 +0000 (+0000) Subject: arm64: smp: Handle errors reported by the firmware X-Git-Tag: v4.9.206~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42c9c872d7da3d8c75785d8c67b10cef542f23a8;p=platform%2Fkernel%2Flinux-amlogic.git arm64: smp: Handle errors reported by the firmware [ Upstream commit f357b3a7e17af7736d67d8267edc1ed3d1dd9391 ] The __cpu_up() routine ignores the errors reported by the firmware for a CPU bringup operation and looks for the error status set by the booting CPU. If the CPU never entered the kernel, we could end up in assuming stale error status, which otherwise would have been set/cleared appropriately by the booting CPU. Reported-by: Steve Capper Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index f0c4152..b2d6de9 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -173,6 +173,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) } } else { pr_err("CPU%u: failed to boot: %d\n", cpu, ret); + return ret; } secondary_data.stack = NULL;