Eric,

On powerpc, the panic CPU sends an IPI to shoot down other CPUs. Since not an NMI, may not able to stop all CPUs before kdump boot. However, one solution could be, if some CPU are not stopped, asking the user to activate soft-reset (either from management console or pressing soft-reset button) which sends FW NMI to all CPUs. These CPUS will execute arch specific kdump func which has to be invoked machine_kexec() directly. At present, kexec_crash_image is not passed to machine_crash_shutdown() or defined as static in kexec.c. Please let me know if there are any issues with this patch.

or how about
image = xchg(&kexec_crash_image, kexec_crash_image);

I do not have access to proper e-mail client right now. I will re-post the patch if you are OK.
Thanks
Haren



--- 2616g10sr/kernel/kexec.c.orig                 2006-04-07 23:51:24.000000000 -0700
+++ 2616g10sr/kernel/kexec.c                 2006-04-08 17:37:23.000000000 -0700
@@ -903,7 +903,7 @@ static int kimage_load_segment(struct ki
 * that to happen you need to do that yourself.
 */
struct kimage *kexec_image = NULL;
-static struct kimage *kexec_crash_image = NULL;
+struct kimage *kexec_crash_image = NULL;
/*
 * A home grown binary mutex.
 * Nothing can wait so this mutex is safe to use
@@ -1049,19 +1049,14 @@ void crash_kexec(struct pt_regs *regs)
                 /* Take the kexec_lock here to prevent sys_kexec_load
                  * running on one cpu from replacing the crash kernel
                  * we are using after a panic on a different cpu.
-                  *
-                  * If the crash kernel was not located in a fixed area
-                  * of memory the xchg(&kexec_crash_image) would be
-                  * sufficient.  But since I reuse the memory...
                  */
                 locked = xchg(&kexec_lock, 1);
                 if (!locked) {
-                                  image = xchg(&kexec_crash_image, NULL);
-                                  if (image) {
+                                  if (kexec_crash_image) {
                                                   struct pt_regs fixed_regs;
                                                   crash_setup_regs(&fixed_regs, regs);
                                                   machine_crash_shutdown(&fixed_regs);
-                                                   machine_kexec(image);
+                                                   machine_kexec(kexec_crash_image);
                                  }
                                  xchg(&kexec_lock, 0);
                 }
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to