diff options
author | Matt Redfearn <[email protected]> | 2016-11-04 09:28:58 +0000 |
---|---|---|
committer | Ralf Baechle <[email protected]> | 2017-01-03 16:34:38 +0100 |
commit | 5b0093f3a4acc7f393f102e7e064f70efc3375b9 (patch) | |
tree | 0a0c172d0a1c4e98ffb7cfc5fe40c79e83a7aa2b | |
parent | 5892d6a60341d50e1765a86fba0976c747f4fb19 (diff) |
MIPS: SMP-CPS: Don't BUG if a CPU fails to start
If there is no online CPU within a core which could receive the IPI to
start another VP in that core, a BUG() is triggered. Instead print a
warning and gracefully handle the failure such that the system remains
usable, albeit without the requested secondary CPU.
Signed-off-by: Matt Redfearn <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Qais Yousef <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/14504/
Signed-off-by: Ralf Baechle <[email protected]>
-rw-r--r-- | arch/mips/kernel/smp-cps.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 44339b470ef4..a2544c2394e4 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -326,7 +326,11 @@ static void cps_boot_secondary(int cpu, struct task_struct *idle) if (cpu_online(remote)) break; } - BUG_ON(remote >= NR_CPUS); + if (remote >= NR_CPUS) { + pr_crit("No online CPU in core %u to start CPU%d\n", + core, cpu); + goto out; + } err = smp_call_function_single(remote, remote_vpe_boot, NULL, 1); |