* [PATCH] powerpc/kdump: Stop all other CPUs before running crash handlers
@ 2010-08-03 6:39 Anton Blanchard
2010-08-03 23:12 ` Matt Evans
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2010-08-03 6:39 UTC (permalink / raw)
To: benh, mikey, matt; +Cc: linuxppc-dev
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>
---
Index: powerpc.git/arch/powerpc/kernel/crash.c
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/crash.c 2010-07-15 20:49:39.941991306 +1000
+++ powerpc.git/arch/powerpc/kernel/crash.c 2010-08-03 16:36:08.451991018 +1000
@@ -402,6 +402,18 @@ void default_machine_crash_shutdown(stru
*/
hard_irq_disable();
+ /*
+ * Make a note of crashing cpu. Will be used in machine_kexec
+ * such that another IPI will not be sent.
+ */
+ crashing_cpu = smp_processor_id();
+ crash_save_cpu(regs, crashing_cpu);
+ crash_kexec_prepare_cpus(crashing_cpu);
+ cpu_set(crashing_cpu, cpus_in_crash);
+#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
+ crash_kexec_wait_realmode(crashing_cpu);
+#endif
+
for_each_irq(i) {
struct irq_desc *desc = irq_to_desc(i);
@@ -438,18 +450,8 @@ void default_machine_crash_shutdown(stru
crash_shutdown_cpu = -1;
__debugger_fault_handler = old_handler;
- /*
- * Make a note of crashing cpu. Will be used in machine_kexec
- * such that another IPI will not be sent.
- */
- crashing_cpu = smp_processor_id();
- crash_save_cpu(regs, crashing_cpu);
- crash_kexec_prepare_cpus(crashing_cpu);
- cpu_set(crashing_cpu, cpus_in_crash);
crash_kexec_stop_spus();
-#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
- crash_kexec_wait_realmode(crashing_cpu);
-#endif
+
if (ppc_md.kexec_cpu_down)
ppc_md.kexec_cpu_down(1, 0);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/kdump: Stop all other CPUs before running crash handlers
2010-08-03 6:39 [PATCH] powerpc/kdump: Stop all other CPUs before running crash handlers Anton Blanchard
@ 2010-08-03 23:12 ` Matt Evans
0 siblings, 0 replies; 2+ messages in thread
From: Matt Evans @ 2010-08-03 23:12 UTC (permalink / raw)
To: Anton Blanchard; +Cc: mikey, linuxppc-dev
Anton Blanchard wrote:
> 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>
Looks like a sensible idea!
Acked-by: Matt Evans <matt@ozlabs.org>
> ---
>
> Index: powerpc.git/arch/powerpc/kernel/crash.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/kernel/crash.c 2010-07-15 20:49:39.941991306 +1000
> +++ powerpc.git/arch/powerpc/kernel/crash.c 2010-08-03 16:36:08.451991018 +1000
> @@ -402,6 +402,18 @@ void default_machine_crash_shutdown(stru
> */
> hard_irq_disable();
>
> + /*
> + * Make a note of crashing cpu. Will be used in machine_kexec
> + * such that another IPI will not be sent.
> + */
> + crashing_cpu = smp_processor_id();
> + crash_save_cpu(regs, crashing_cpu);
> + crash_kexec_prepare_cpus(crashing_cpu);
> + cpu_set(crashing_cpu, cpus_in_crash);
> +#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
> + crash_kexec_wait_realmode(crashing_cpu);
> +#endif
> +
> for_each_irq(i) {
> struct irq_desc *desc = irq_to_desc(i);
>
> @@ -438,18 +450,8 @@ void default_machine_crash_shutdown(stru
> crash_shutdown_cpu = -1;
> __debugger_fault_handler = old_handler;
>
> - /*
> - * Make a note of crashing cpu. Will be used in machine_kexec
> - * such that another IPI will not be sent.
> - */
> - crashing_cpu = smp_processor_id();
> - crash_save_cpu(regs, crashing_cpu);
> - crash_kexec_prepare_cpus(crashing_cpu);
> - cpu_set(crashing_cpu, cpus_in_crash);
> crash_kexec_stop_spus();
> -#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
> - crash_kexec_wait_realmode(crashing_cpu);
> -#endif
> +
> if (ppc_md.kexec_cpu_down)
> ppc_md.kexec_cpu_down(1, 0);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-03 23:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 6:39 [PATCH] powerpc/kdump: Stop all other CPUs before running crash handlers Anton Blanchard
2010-08-03 23:12 ` Matt Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).