summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Chiu <wchiu@qca.qualcomm.com>2014-09-11 13:08:44 +0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-09-17 13:54:40 -0700
commit9de94ef6bb00e26fc84e0d16a146d7002acab85b (patch)
tree12363014017f7f6cfd577babdd681f93fcd5d6a9
parent26369e19bc4d003d1e067644ae85d3a854954753 (diff)
qcacld: system did not reboot after calling BUG_ON
Redefine VOS_BUG under CONFIG_X86 macro and call panic to let system reboot with crash dump tool at x86. Change-Id: I79c463c914c8bf999b6a1671deaa4c2f7a80bc1d CRs-Fixed: 722874
-rw-r--r--CORE/VOSS/inc/i_vos_trace.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/CORE/VOSS/inc/i_vos_trace.h b/CORE/VOSS/inc/i_vos_trace.h
index ce75a27bf824..853164d122c2 100644
--- a/CORE/VOSS/inc/i_vos_trace.h
+++ b/CORE/VOSS/inc/i_vos_trace.h
@@ -125,7 +125,17 @@ void __printf(3,4) vos_snprintf(char *strBuffer, unsigned int size,
#endif
#ifdef PANIC_ON_BUG
-
+#ifdef CONFIG_X86
+/* BUG_ON does not call panic on x86,so call panic directly */
+#define VOS_BUG( _condition ) do { \
+ if ( ! ( _condition ) ) \
+ { \
+ printk(KERN_CRIT "VOS BUG in %s Line %d\n", __func__, __LINE__); \
+ dump_stack(); \
+ panic("BUG"); \
+ } \
+ } while(0)
+#else
#define VOS_BUG( _condition ) do { \
if ( ! ( _condition ) ) \
{ \
@@ -133,6 +143,7 @@ void __printf(3,4) vos_snprintf(char *strBuffer, unsigned int size,
BUG_ON(1); \
} \
} while(0)
+#endif
#else