diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/panic.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 126b2ef2eb61..df3a06a32496 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -63,6 +63,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 +84,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 @@ -356,6 +367,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(); |