summaryrefslogtreecommitdiff
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorSatyajit Desai <sadesai@codeaurora.org>2016-06-27 12:39:34 -0700
committerSatyajit Desai <sadesai@codeaurora.org>2016-08-19 14:56:53 -0700
commitc34bf4be22d64499449d1cfe550b05365d048403 (patch)
tree9a1558daae6ed11ba043063b2ab588c227e191c6 /kernel/panic.c
parent0c8cf716fa02d0f6b6ef2ef1446f9f4819fc83dd (diff)
coresight: abort coresight tracing on kernel crash
Add trace events to control aborting CoreSight trace dynamically based on module parameter. Coresight driver will dump any trace present in the current sink in case we hit a kernel panic, user fault or an undefined instruction. Change-Id: Iee1ccf5cbd7b767753a3115c0570e63fbe2aa8f3 Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 223564d3e1f8..b4a0edc489c5 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -25,6 +25,9 @@
#include <linux/nmi.h>
#include <linux/console.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/exception.h>
+
#define PANIC_TIMER_STEP 100
#define PANIC_BLINK_SPD 18
@@ -80,6 +83,8 @@ void panic(const char *fmt, ...)
long i, i_next = 0;
int state = 0;
+ trace_kernel_panic(0);
+
/*
* Disable local interrupts. This will prevent panic_smp_self_stop
* from deadlocking the first cpu that invokes the panic, since
@@ -181,6 +186,9 @@ void panic(const char *fmt, ...)
mdelay(PANIC_TIMER_STEP);
}
}
+
+ trace_kernel_panic_late(0);
+
if (panic_timeout != 0) {
/*
* This will not be a clean reboot, with everything