提交 9918cc2e 编写于 作者: D David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 39dd992a
...@@ -535,11 +535,21 @@ static int dr_cpu_configure(struct ds_cap_state *cp, u64 req_num, ...@@ -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); printk(KERN_INFO PFX "Starting cpu %d...\n", cpu);
err = cpu_up(cpu); err = cpu_up(cpu);
if (err) { 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", printk(KERN_INFO PFX "CPU startup failed err=%d\n",
err); err);
dr_cpu_mark(resp, cpu, ncpus, dr_cpu_mark(resp, cpu, ncpus, res, stat);
DR_CPU_RES_FAILURE,
DR_CPU_STAT_UNCONFIGURED);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册