diff options
author | Anton Blanchard <anton@samba.org> | 2011-07-24 21:46:32 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-08-05 00:47:57 -0400 |
commit | b1301797f30370c430244979671978fc232f4533 (patch) | |
tree | d3e03d2023b23f0d7d14c4e52d7c7b1e5613f2cc /arch/powerpc | |
parent | a149507bdb78d69e0020dbb505f3c55b205b69b3 (diff) |
powerpc/pseries: Fix kexec on recent firmware versions
Recent versions of firmware will fail to unmap the virtual processor
area if we have a dispatch trace log registered. This causes kexec
to fail.
If a trace log is registered this patch unregisters it before the
SLB shadow and virtual processor areas, fixing the problem.
The address argument is ignored by firmware on unregister so we
may as well remove it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/dtl.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/kexec.c | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/plpar_wrappers.h | 4 |
3 files changed, 14 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c index e9190073bb97..0e8656370063 100644 --- a/arch/powerpc/platforms/pseries/dtl.c +++ b/arch/powerpc/platforms/pseries/dtl.c | |||
@@ -181,7 +181,7 @@ static void dtl_stop(struct dtl *dtl) | |||
181 | 181 | ||
182 | lppaca_of(dtl->cpu).dtl_enable_mask = 0x0; | 182 | lppaca_of(dtl->cpu).dtl_enable_mask = 0x0; |
183 | 183 | ||
184 | unregister_dtl(hwcpu, __pa(dtl->buf)); | 184 | unregister_dtl(hwcpu); |
185 | } | 185 | } |
186 | 186 | ||
187 | static u64 dtl_current_index(struct dtl *dtl) | 187 | static u64 dtl_current_index(struct dtl *dtl) |
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c index 54cf3a4aa16b..1118cb79f9e3 100644 --- a/arch/powerpc/platforms/pseries/kexec.c +++ b/arch/powerpc/platforms/pseries/kexec.c | |||
@@ -26,6 +26,17 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | |||
26 | /* Don't risk a hypervisor call if we're crashing */ | 26 | /* Don't risk a hypervisor call if we're crashing */ |
27 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { | 27 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { |
28 | unsigned long addr; | 28 | unsigned long addr; |
29 | int ret; | ||
30 | |||
31 | if (get_lppaca()->dtl_enable_mask) { | ||
32 | ret = unregister_dtl(hard_smp_processor_id()); | ||
33 | if (ret) { | ||
34 | pr_err("WARNING: DTL deregistration for cpu " | ||
35 | "%d (hw %d) failed with %d\n", | ||
36 | smp_processor_id(), | ||
37 | hard_smp_processor_id(), ret); | ||
38 | } | ||
39 | } | ||
29 | 40 | ||
30 | addr = __pa(get_slb_shadow()); | 41 | addr = __pa(get_slb_shadow()); |
31 | if (unregister_slb_shadow(hard_smp_processor_id(), addr)) | 42 | if (unregister_slb_shadow(hard_smp_processor_id(), addr)) |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index 4bf21207d7d3..a6921aec2d6f 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -73,9 +73,9 @@ static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) | |||
73 | return vpa_call(0x3, cpu, vpa); | 73 | return vpa_call(0x3, cpu, vpa); |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline long unregister_dtl(unsigned long cpu, unsigned long vpa) | 76 | static inline long unregister_dtl(unsigned long cpu) |
77 | { | 77 | { |
78 | return vpa_call(0x6, cpu, vpa); | 78 | return vpa_call(0x6, cpu, 0); |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline long register_dtl(unsigned long cpu, unsigned long vpa) | 81 | static inline long register_dtl(unsigned long cpu, unsigned long vpa) |