diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-15 05:02:01 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-16 07:05:24 -0400 |
commit | 9918cc2e3275bf7f3561e4de1d5a3314183e71dc (patch) | |
tree | f7abebbb06a98df14b6807d9f2fad3099f0ab155 | |
parent | 39dd992aee381ff5077536853051fc69e58cc4a9 (diff) |
[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>
-rw-r--r-- | arch/sparc64/kernel/ds.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index d412cf876ab4..b6331718ee0c 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, | |||
535 | printk(KERN_INFO PFX "Starting cpu %d...\n", cpu); | 535 | printk(KERN_INFO PFX "Starting cpu %d...\n", cpu); |
536 | err = cpu_up(cpu); | 536 | err = cpu_up(cpu); |
537 | if (err) { | 537 | if (err) { |
538 | __u32 res = DR_CPU_RES_FAILURE; | ||
539 | __u32 stat = DR_CPU_STAT_UNCONFIGURED; | ||
540 | |||
541 | if (!cpu_present(cpu)) { | ||
542 | /* CPU not present in MD */ | ||
543 | res = DR_CPU_RES_NOT_IN_MD; | ||
544 | stat = DR_CPU_STAT_NOT_PRESENT; | ||
545 | } else if (err == -ENODEV) { | ||
546 | /* CPU did not call in successfully */ | ||
547 | res = DR_CPU_RES_CPU_NOT_RESPONDING; | ||
548 | } | ||
549 | |||
538 | printk(KERN_INFO PFX "CPU startup failed err=%d\n", | 550 | printk(KERN_INFO PFX "CPU startup failed err=%d\n", |
539 | err); | 551 | err); |
540 | dr_cpu_mark(resp, cpu, ncpus, | 552 | dr_cpu_mark(resp, cpu, ncpus, res, stat); |
541 | DR_CPU_RES_FAILURE, | ||
542 | DR_CPU_STAT_UNCONFIGURED); | ||
543 | } | 553 | } |
544 | } | 554 | } |
545 | 555 | ||