A direct call to crash_kexec() here allows the crashing register state
to be saved to the PT_NOTE. When called from panic(), a new register
state is created which is less useful.
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
#include <linux/reboot.h>
#include <linux/gfp.h>
#include <linux/context_tracking.h>
+#include <linux/kexec.h>
#include <asm/smp.h>
#include <asm/delay.h>
return (struct reg_window *) (fp + STACK_BIAS);
}
+static int crashing_cpu;
+
void __noreturn die_if_kernel(char *str, struct pt_regs *regs)
{
static int die_counter;
}
user_instruction_dump ((unsigned int __user *) regs->tpc);
}
+ crashing_cpu = smp_processor_id();
+ crash_kexec(regs);
if (panic_on_oops)
panic("Fatal exception");
if (regs->tstate & TSTATE_PRIV)