aboutsummaryrefslogtreecommitdiff
path: root/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 126b2ef2eb6..ea4a50cb624 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -22,6 +22,7 @@
#include <linux/sysrq.h>
#include <linux/init.h>
#include <linux/nmi.h>
+#include <linux/console.h>
#define PANIC_TIMER_STEP 100
#define PANIC_BLINK_SPD 18
@@ -63,6 +64,11 @@ void __weak panic_smp_self_stop(void)
cpu_relax();
}
+#ifdef CONFIG_TEGRA_NVDUMPER
+#include <mach/nvdumper.h>
+static int is_oops_called;
+#endif /* CONFIG_TEGRA_NVDUMPER */
+
/**
* panic - halt the system
* @fmt: The text string to print
@@ -79,6 +85,12 @@ void panic(const char *fmt, ...)
long i, i_next = 0;
int state = 0;
+#ifdef CONFIG_TEGRA_NVDUMPER
+ /* if panic is called directly */
+ if (!is_oops_called)
+ nvdumper_crash_setup_regs();
+#endif
+
/*
* Disable local interrupts. This will prevent panic_smp_self_stop
* from deadlocking the first cpu that invokes the panic, since
@@ -134,6 +146,8 @@ void panic(const char *fmt, ...)
bust_spinlocks(0);
+ console_flush_on_panic();
+
if (!panic_blink)
panic_blink = no_blink;
@@ -356,6 +370,10 @@ int oops_may_print(void)
*/
void oops_enter(void)
{
+#ifdef CONFIG_TEGRA_NVDUMPER
+ is_oops_called = 1;
+#endif
+
tracing_off();
/* can't trust the integrity of the kernel anymore: */
debug_locks_off();