Skip to content

Commit ba051f0

Browse files
iwamatsu-tctmarinas
authored andcommitted
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 d22b115 ("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: d22b115 ("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]>
1 parent 8cfb347 commit ba051f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
176176
panic("CPU%u detected unsupported configuration\n", cpu);
177177
}
178178

179-
return ret;
179+
return -EIO;
180180
}
181181

182182
static void init_gic_priority_masking(void)

0 commit comments

Comments
 (0)