aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/kexec.h10
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c2
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c8
3 files changed, 18 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h
index 19c36cba37c4..a46f5f45570c 100644
--- a/arch/powerpc/include/asm/kexec.h
+++ b/arch/powerpc/include/asm/kexec.h
@@ -86,6 +86,11 @@ extern int overlaps_crashkernel(unsigned long start, unsigned long size);
86extern void reserve_crashkernel(void); 86extern void reserve_crashkernel(void);
87extern void machine_kexec_mask_interrupts(void); 87extern void machine_kexec_mask_interrupts(void);
88 88
89static inline bool kdump_in_progress(void)
90{
91 return crashing_cpu >= 0;
92}
93
89#else /* !CONFIG_KEXEC */ 94#else /* !CONFIG_KEXEC */
90static inline void crash_kexec_secondary(struct pt_regs *regs) { } 95static inline void crash_kexec_secondary(struct pt_regs *regs) { }
91 96
@@ -106,6 +111,11 @@ static inline int crash_shutdown_unregister(crash_shutdown_t handler)
106 return 0; 111 return 0;
107} 112}
108 113
114static inline bool kdump_in_progress(void)
115{
116 return false;
117}
118
109#endif /* CONFIG_KEXEC */ 119#endif /* CONFIG_KEXEC */
110#endif /* ! __ASSEMBLY__ */ 120#endif /* ! __ASSEMBLY__ */
111#endif /* __KERNEL__ */ 121#endif /* __KERNEL__ */
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 879b3aacac32..f96d1ec24189 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -330,7 +330,7 @@ void default_machine_kexec(struct kimage *image)
330 * using debugger IPI. 330 * using debugger IPI.
331 */ 331 */
332 332
333 if (crashing_cpu == -1) 333 if (!kdump_in_progress())
334 kexec_prepare_cpus(); 334 kexec_prepare_cpus();
335 335
336 pr_debug("kexec: Starting switchover sequence.\n"); 336 pr_debug("kexec: Starting switchover sequence.\n");
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 469751d92004..b5682fd6c984 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -43,6 +43,7 @@
43#include <asm/trace.h> 43#include <asm/trace.h>
44#include <asm/firmware.h> 44#include <asm/firmware.h>
45#include <asm/plpar_wrappers.h> 45#include <asm/plpar_wrappers.h>
46#include <asm/kexec.h>
46#include <asm/fadump.h> 47#include <asm/fadump.h>
47 48
48#include "pseries.h" 49#include "pseries.h"
@@ -267,8 +268,13 @@ static void pSeries_lpar_hptab_clear(void)
267 * out to the user, but at least this will stop us from 268 * out to the user, but at least this will stop us from
268 * continuing on further and creating an even more 269 * continuing on further and creating an even more
269 * difficult to debug situation. 270 * difficult to debug situation.
271 *
272 * There is a known problem when kdump'ing, if cpus are offline
273 * the above call will fail. Rather than panicking again, keep
274 * going and hope the kdump kernel is also little endian, which
275 * it usually is.
270 */ 276 */
271 if (rc) 277 if (rc && !kdump_in_progress())
272 panic("Could not enable big endian exceptions"); 278 panic("Could not enable big endian exceptions");
273 } 279 }
274#endif 280#endif