提交 ba051f09 编写于 作者: N Nobuhiro Iwamatsu 提交者: Catalin Marinas

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 d22b115c
("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: d22b115c ("arm64/kernel: Simplify __cpu_up() by bailing out early")
Signed-off-by: NNobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Tested-by: NYuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Acked-by: NWill Deacon <will@kernel.org>
Cc: Gavin Shan <gshan@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20200527233457.2531118-1-nobuhiro1.iwamatsu@toshiba.co.jp
[catalin.marinas@arm.com: return -EIO at the end of the function]
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 8cfb347a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册