diff options
author | Nobuhiro Iwamatsu <[email protected]> | 2020-05-28 08:34:57 +0900 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2020-05-28 12:04:55 +0100 |
commit | ba051f097fc30b00f6b66044386901141351a557 (patch) | |
tree | d733e5c3dcfcb03d59cda9fab6c12c8df5706326 | |
parent | 8cfb347ad0cffdbfc69c82506fb3be9429563211 (diff) |
arm64/kernel: Fix return value when cpu_online() fails in __cpu_up()
If boot_secondary() was successful, and cpu_online() was an error in
__cpu_up(), -EIO was returned, but 0 is returned by commit d22b115cbfbb7
("arm64/kernel: Simplify __cpu_up() by bailing out early").
Therefore, bringup_wait_for_ap() causes the primary core to wait for a
long time, which may cause boot failure.
This commit sets -EIO to return code under the same conditions.
Fixes: d22b115cbfbb ("arm64/kernel: Simplify __cpu_up() by bailing out early")
Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
Tested-by: Yuji Ishikawa <[email protected]>
Acked-by: Will Deacon <[email protected]>
Cc: Gavin Shan <[email protected]>
Cc: Mark Rutland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[[email protected]: return -EIO at the end of the function]
Signed-off-by: Catalin Marinas <[email protected]>
-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 061f60fe452f..bb813d06114a 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -176,7 +176,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) panic("CPU%u detected unsupported configuration\n", cpu); } - return ret; + return -EIO; } static void init_gic_priority_masking(void) |