summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-08-17 18:31:58 -0500
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:54:02 -0800
commit4e09c510185cb4db2277ce81cce81b7aa06bea45 (patch)
tree58aab6bb6279838d61b5278bb1c1176ed80e8d71 /kernel
parent0b7503bc0eef1b90c214059f2952539a2b89d8fe (diff)
panic: Add board ID to panic output
At times, it is necessary for boards to provide some additional information as part of panic logs. Provide information on the board hardware as part of panic logs. It is safer to print this information at the very end in case something bad happens as part of the information retrieval itself. To use this, set global mach_panic_string to an appropriate string in the board file. Change-Id: Id12cdda87b0cd2940dd01d52db97e6162f671b4d Signed-off-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/panic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 4b150bc0c6c1..f07bfc9fe613 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -28,6 +28,9 @@
#define PANIC_TIMER_STEP 100
#define PANIC_BLINK_SPD 18
+/* Machine specific panic information string */
+char *mach_panic_string;
+
int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE;
static unsigned long tainted_mask;
static int pause_on_oops;
@@ -413,6 +416,11 @@ late_initcall(init_oops_id);
void print_oops_end_marker(void)
{
init_oops_id();
+
+ if (mach_panic_string)
+ printk(KERN_WARNING "Board Information: %s\n",
+ mach_panic_string);
+
pr_warn("---[ end trace %016llx ]---\n", (unsigned long long)oops_id);
}