From 2d191233882a031304f41cfc6abfb70536780645 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 24 Apr 2008 08:58:44 +0800 Subject: [Blackfin] arch: define our own BUG() so we can dump the blackfin hardware trace buffer Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/bug.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/asm-blackfin/bug.h') diff --git a/include/asm-blackfin/bug.h b/include/asm-blackfin/bug.h index 41e53b29f16..6d3e11b1fc5 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 + #endif -- cgit v1.2.3-70-g09d2