Skip to content

Commit

Permalink
ARM: smp: improve CPU bringup failure diagnostics
Browse files Browse the repository at this point in the history
We used to print a bland error message which gave no clue as to the
failure when we failed to bring up a secondary CPU.  Resolve this by
separating the two failure cases.

If boot_secondary() fails, we print a message indicating the returned
error code from boot_secondary():
	"CPU%u: failed to boot: %d\n", cpu, ret.

However, if boot_secondary() succeeded, but the CPU did not appear to
mark itself online within the timeout, indicate that it failed to come
online:
	"CPU%u: failed to come online\n", cpu

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent 90b4419 commit 58613cd
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,12 @@ int __cpuinit __cpu_up(unsigned int cpu)
barrier();
}

if (!cpu_online(cpu))
if (!cpu_online(cpu)) {
pr_crit("CPU%u: failed to come online\n", cpu);
ret = -EIO;
}
} else {
pr_err("CPU%u: failed to boot: %d\n", cpu, ret);
}

secondary_data.stack = NULL;
Expand All @@ -181,14 +185,6 @@ int __cpuinit __cpu_up(unsigned int cpu)

pgd_free(&init_mm, pgd);

if (ret) {
printk(KERN_CRIT "CPU%u: processor failed to boot\n", cpu);

/*
* FIXME: We need to clean up the new idle thread. --rmk
*/
}

return ret;
}

Expand Down

0 comments on commit 58613cd

Please sign in to comment.