diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 44339b470ef44e598dc20acbfdfd840487503a31..a2544c2394e42331cceee8f0bbf5b538f36e24fb 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);