summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorYifei Wan <ywan@nvidia.com>2014-04-24 10:51:19 -0500
committerMandar Padmawar <mpadmawar@nvidia.com>2014-04-29 22:47:12 -0700
commitfe58eed2a3a88559370b7a2694178c6ecd049ec4 (patch)
tree3b279d13ae274454aea2d97b7df3b46e8dcb2f93 /kernel
parentd8b41004f38dda7a16ba972ef0852d850b264927 (diff)
ARM: tegra: add armv8 cpu registers to nvdumper
Bug 1498965 Change-Id: I353b383acd5ae32338ef38468787644fc9eafe48 Signed-off-by: Yifei Wan <ywan@nvidia.com> Reviewed-on: http://git-master/r/400929 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/panic.c15
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();