summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-08-17 18:31:58 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-04-21 22:34:35 -0500
commitc8ed6b131f2d1c8e58558d1daa70744818481f5d (patch)
tree89e56d7a371d02661324003fd7aff83bc85a29f6 /kernel
parent10734b6a9719d96086e8e6fe6b78630676570075 (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 1daccb2ffa03..126b2ef2eb61 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -26,6 +26,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;
@@ -378,6 +381,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);
+
printk(KERN_WARNING "---[ end trace %016llx ]---\n",
(unsigned long long)oops_id);
}