aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/crash.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-08-02 16:39:41 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-24 01:26:27 -0400
commit249ec2287579d578ea72593dc3b30a00121c4075 (patch)
tree4b6a59b9a793db06a0cc272db51d968ca4ed5ee5 /arch/powerpc/kernel/crash.c
parent3469270807ffde921ad36f90d7b8c8e095d3e4e8 (diff)
powerpc/kdump: Stop all other CPUs before running crash handlers
During kdump we run the crash handlers first then stop all other CPUs. We really want to stop all CPUs as close to the fail as possible and also have a very controlled environment for running the crash handlers, so it makes sense to reverse the order. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/crash.c')
-rw-r--r--arch/powerpc/kernel/crash.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 417f7b05a9ce..4457382f8667 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -402,6 +402,18 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
402 */ 402 */
403 hard_irq_disable(); 403 hard_irq_disable();
404 404
405 /*
406 * Make a note of crashing cpu. Will be used in machine_kexec
407 * such that another IPI will not be sent.
408 */
409 crashing_cpu = smp_processor_id();
410 crash_save_cpu(regs, crashing_cpu);
411 crash_kexec_prepare_cpus(crashing_cpu);
412 cpu_set(crashing_cpu, cpus_in_crash);
413#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
414 crash_kexec_wait_realmode(crashing_cpu);
415#endif
416
405 for_each_irq(i) { 417 for_each_irq(i) {
406 struct irq_desc *desc = irq_to_desc(i); 418 struct irq_desc *desc = irq_to_desc(i);
407 419
@@ -438,18 +450,8 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
438 crash_shutdown_cpu = -1; 450 crash_shutdown_cpu = -1;
439 __debugger_fault_handler = old_handler; 451 __debugger_fault_handler = old_handler;
440 452
441 /*
442 * Make a note of crashing cpu. Will be used in machine_kexec
443 * such that another IPI will not be sent.
444 */
445 crashing_cpu = smp_processor_id();
446 crash_save_cpu(regs, crashing_cpu);
447 crash_kexec_prepare_cpus(crashing_cpu);
448 cpu_set(crashing_cpu, cpus_in_crash);
449 crash_kexec_stop_spus(); 453 crash_kexec_stop_spus();
450#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) 454
451 crash_kexec_wait_realmode(crashing_cpu);
452#endif
453 if (ppc_md.kexec_cpu_down) 455 if (ppc_md.kexec_cpu_down)
454 ppc_md.kexec_cpu_down(1, 0); 456 ppc_md.kexec_cpu_down(1, 0);
455} 457}