diff options
author | Anton Blanchard <anton@samba.org> | 2011-07-24 21:46:33 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-08-05 00:47:57 -0400 |
commit | 711ef84e80ec6f937ad59c7a00490421a5c92867 (patch) | |
tree | 7a162ea45846138eafc28862e6b1caa2f5c934a5 /arch/powerpc | |
parent | b1301797f30370c430244979671978fc232f4533 (diff) |
powerpc/pseries: Cleanup VPA registration and deregistration errors
Make the VPA, SLB shadow and DTL registration and deregistration
functions print consistent messages on error. I needed the firmware
error code while chasing a kexec bug but we weren't printing it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/kexec.c | 19 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 5 |
3 files changed, 22 insertions, 19 deletions
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c index 1118cb79f9e3..3bae8bd7db3b 100644 --- a/arch/powerpc/platforms/pseries/kexec.c +++ b/arch/powerpc/platforms/pseries/kexec.c | |||
@@ -39,17 +39,20 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | addr = __pa(get_slb_shadow()); | 41 | addr = __pa(get_slb_shadow()); |
42 | if (unregister_slb_shadow(hard_smp_processor_id(), addr)) | 42 | ret = unregister_slb_shadow(hard_smp_processor_id(), addr); |
43 | printk("SLB shadow buffer deregistration of " | 43 | if (ret) { |
44 | "cpu %u (hw_cpu_id %d) failed\n", | 44 | pr_err("WARNING: SLB shadow buffer deregistration " |
45 | "for cpu %d (hw %d) failed with %d\n", | ||
45 | smp_processor_id(), | 46 | smp_processor_id(), |
46 | hard_smp_processor_id()); | 47 | hard_smp_processor_id(), ret); |
48 | } | ||
47 | 49 | ||
48 | addr = __pa(get_lppaca()); | 50 | addr = __pa(get_lppaca()); |
49 | if (unregister_vpa(hard_smp_processor_id(), addr)) { | 51 | ret = unregister_vpa(hard_smp_processor_id(), addr); |
50 | printk("VPA deregistration of cpu %u (hw_cpu_id %d) " | 52 | if (ret) { |
51 | "failed\n", smp_processor_id(), | 53 | pr_err("WARNING: VPA deregistration for cpu %d " |
52 | hard_smp_processor_id()); | 54 | "(hw %d) failed with %d\n", smp_processor_id(), |
55 | hard_smp_processor_id(), ret); | ||
53 | } | 56 | } |
54 | } | 57 | } |
55 | } | 58 | } |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 225aecf7b425..c9a29dae8c05 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -67,9 +67,8 @@ void vpa_init(int cpu) | |||
67 | ret = register_vpa(hwcpu, addr); | 67 | ret = register_vpa(hwcpu, addr); |
68 | 68 | ||
69 | if (ret) { | 69 | if (ret) { |
70 | printk(KERN_ERR "WARNING: vpa_init: VPA registration for " | 70 | pr_err("WARNING: VPA registration for cpu %d (hw %d) of area " |
71 | "cpu %d (hw %d) of area %lx returns %ld\n", | 71 | "%lx failed with %ld\n", cpu, hwcpu, addr, ret); |
72 | cpu, hwcpu, addr, ret); | ||
73 | return; | 72 | return; |
74 | } | 73 | } |
75 | /* | 74 | /* |
@@ -80,10 +79,9 @@ void vpa_init(int cpu) | |||
80 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 79 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
81 | ret = register_slb_shadow(hwcpu, addr); | 80 | ret = register_slb_shadow(hwcpu, addr); |
82 | if (ret) | 81 | if (ret) |
83 | printk(KERN_ERR | 82 | pr_err("WARNING: SLB shadow buffer registration for " |
84 | "WARNING: vpa_init: SLB shadow buffer " | 83 | "cpu %d (hw %d) of area %lx failed with %ld\n", |
85 | "registration for cpu %d (hw %d) of area %lx " | 84 | cpu, hwcpu, addr, ret); |
86 | "returns %ld\n", cpu, hwcpu, addr, ret); | ||
87 | } | 85 | } |
88 | 86 | ||
89 | /* | 87 | /* |
@@ -100,8 +98,9 @@ void vpa_init(int cpu) | |||
100 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; | 98 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; |
101 | ret = register_dtl(hwcpu, __pa(dtl)); | 99 | ret = register_dtl(hwcpu, __pa(dtl)); |
102 | if (ret) | 100 | if (ret) |
103 | pr_warn("DTL registration failed for cpu %d (%ld)\n", | 101 | pr_err("WARNING: DTL registration of cpu %d (hw %d) " |
104 | cpu, ret); | 102 | "failed with %ld\n", smp_processor_id(), |
103 | hwcpu, ret); | ||
105 | lppaca_of(cpu).dtl_enable_mask = 2; | 104 | lppaca_of(cpu).dtl_enable_mask = 2; |
106 | } | 105 | } |
107 | } | 106 | } |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index d00e52926b71..0969fd98c4fa 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -324,8 +324,9 @@ static int alloc_dispatch_logs(void) | |||
324 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; | 324 | dtl->enqueue_to_dispatch_time = DISPATCH_LOG_BYTES; |
325 | ret = register_dtl(hard_smp_processor_id(), __pa(dtl)); | 325 | ret = register_dtl(hard_smp_processor_id(), __pa(dtl)); |
326 | if (ret) | 326 | if (ret) |
327 | pr_warn("DTL registration failed for boot cpu %d (%d)\n", | 327 | pr_err("WARNING: DTL registration of cpu %d (hw %d) failed " |
328 | smp_processor_id(), ret); | 328 | "with %d\n", smp_processor_id(), |
329 | hard_smp_processor_id(), ret); | ||
329 | get_paca()->lppaca_ptr->dtl_enable_mask = 2; | 330 | get_paca()->lppaca_ptr->dtl_enable_mask = 2; |
330 | 331 | ||
331 | return 0; | 332 | return 0; |