diff options
author | Per Fransson <per.xx.fransson@stericsson.com> | 2011-09-23 14:11:24 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2012-03-19 08:50:51 +0100 |
commit | 90d8b016c46a76387b5cd25d52461d8f62adb2bd (patch) | |
tree | eb25b1b57726f10098a2bd5200620ec7f9624040 /kernel | |
parent | c9e033ee49dd488563cead73bd2ebe53bf0f1b12 (diff) |
ux500: Start crash dump through SW reset
When using kexec/kdump without an crash kernel image loaded:
* clean the caches and write the crash_notes
* perform a restart
ST-Ericsson ID: 340331
Change-Id: I1ae34ed2b5e43da4849650a8a7d2f1e453dcbe93
Signed-off-by: Per Fransson <per.xx.fransson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32678
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kexec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index aefd6ff4531..a650adb2594 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1083,6 +1083,7 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry, void crash_kexec(struct pt_regs *regs) { + struct pt_regs fixed_regs; /* Take the kexec_mutex 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. @@ -1093,13 +1094,20 @@ void crash_kexec(struct pt_regs *regs) */ if (mutex_trylock(&kexec_mutex)) { if (kexec_crash_image) { - struct pt_regs fixed_regs; crash_setup_regs(&fixed_regs, regs); crash_save_vmcoreinfo(); machine_crash_shutdown(&fixed_regs); machine_kexec(kexec_crash_image); } +#ifdef CONFIG_CRASH_SWRESET + else { + crash_setup_regs(&fixed_regs, regs); + crash_save_vmcoreinfo(); + machine_crash_shutdown(&fixed_regs); + machine_crash_swreset(); + } +#endif mutex_unlock(&kexec_mutex); } } |