summaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-07-15 02:02:01 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-16 04:05:24 -0700
commit9918cc2e3275bf7f3561e4de1d5a3314183e71dc (patch)
treef7abebbb06a98df14b6807d9f2fad3099f0ab155 /arch/sparc64
parent39dd992aee381ff5077536853051fc69e58cc4a9 (diff)
downloadop-kernel-dev-9918cc2e3275bf7f3561e4de1d5a3314183e71dc.zip
op-kernel-dev-9918cc2e3275bf7f3561e4de1d5a3314183e71dc.tar.gz
[SPARC64]: Give more accurate errors in dr_cpu_configure().
When cpu_up() fails, we can discern the most likely cause. If cpu_present() is false, this means the cpu did not appear in the MD. If -ENODEV is the error return value, then the processor did not boot properly into the kernel. Pass this information back in the dr-cpu response packet. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/ds.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c
index d412cf8..b633171 100644
--- a/arch/sparc64/kernel/ds.c
+++ b/arch/sparc64/kernel/ds.c
@@ -535,11 +535,21 @@ static int dr_cpu_configure(struct ds_cap_state *cp, u64 req_num,
printk(KERN_INFO PFX "Starting cpu %d...\n", cpu);
err = cpu_up(cpu);
if (err) {
+ __u32 res = DR_CPU_RES_FAILURE;
+ __u32 stat = DR_CPU_STAT_UNCONFIGURED;
+
+ if (!cpu_present(cpu)) {
+ /* CPU not present in MD */
+ res = DR_CPU_RES_NOT_IN_MD;
+ stat = DR_CPU_STAT_NOT_PRESENT;
+ } else if (err == -ENODEV) {
+ /* CPU did not call in successfully */
+ res = DR_CPU_RES_CPU_NOT_RESPONDING;
+ }
+
printk(KERN_INFO PFX "CPU startup failed err=%d\n",
err);
- dr_cpu_mark(resp, cpu, ncpus,
- DR_CPU_RES_FAILURE,
- DR_CPU_STAT_UNCONFIGURED);
+ dr_cpu_mark(resp, cpu, ncpus, res, stat);
}
}
OpenPOWER on IntegriCloud