arch: add log output in BUG() define
authorluodw1 <luodw1@motorola.com>
Fri, 19 Oct 2018 06:32:03 +0000 (14:32 +0800)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:50 +0000 (20:23 +0300)
Change-Id: Ide19e8d074c51a46219689676bc5cb5c4aa37ae4
Signed-off-by: luodw1 <luodw1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1258099
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

arch/arm64/include/asm/bug.h

index d7dc437527050736e99dd28e2f0b8bd526551a23..14f68472003da7c41d4420063993e625cbf38a8e 100644 (file)
 #define __BUG_FLAGS(flags)                             \
        asm volatile (__stringify(ASM_BUG_FLAGS(flags)));
 
-#define BUG() do {                                     \
-       __BUG_FLAGS(0);                                 \
-       unreachable();                                  \
+#define BUG() do {                                             \
+       printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__);   \
+       __BUG_FLAGS(0);                                         \
+       unreachable();                                          \
 } while (0)
 
 #define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))