]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
arm64: smp: Handle errors reported by the firmware
authorSuzuki K Poulose <Suzuki.Poulose@arm.com>
Mon, 10 Dec 2018 18:07:33 +0000 (18:07 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 10 Dec 2018 18:42:18 +0000 (18:42 +0000)
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 <steve.capper@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/smp.c

index 4e3bfbde829a803f996af2128c641e48c66d326e..1598d6f7200a5a2f2a323f66c1b0fa95ad4a77b0 100644 (file)
@@ -141,6 +141,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.task = NULL;