summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-04-24 08:58:44 +0800
committerBryan Wu <cooloney@kernel.org>2008-04-24 08:58:44 +0800
commit2d191233882a031304f41cfc6abfb70536780645 (patch)
treec68d548dad2eaedc97230eac6edad71dbedc912c
parent8e9d5c7daff8b74bf3be62cfe0ba48b5af1fa12f (diff)
downloadtalos-obmc-linux-2d191233882a031304f41cfc6abfb70536780645.tar.gz
talos-obmc-linux-2d191233882a031304f41cfc6abfb70536780645.zip
[Blackfin] arch: define our own BUG() so we can dump the blackfin hardware trace buffer
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r--include/asm-blackfin/bug.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-blackfin/bug.h b/include/asm-blackfin/bug.h
index 41e53b29f167..6d3e11b1fc57 100644
--- a/include/asm-blackfin/bug.h
+++ b/include/asm-blackfin/bug.h
@@ -1,4 +1,17 @@
#ifndef _BLACKFIN_BUG_H
#define _BLACKFIN_BUG_H
+
+#ifdef CONFIG_BUG
+#define HAVE_ARCH_BUG
+
+#define BUG() do { \
+ dump_bfin_trace_buffer(); \
+ printk(KERN_EMERG "BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
+ panic("BUG!"); \
+} while (0)
+
+#endif
+
#include <asm-generic/bug.h>
+
#endif
OpenPOWER on IntegriCloud