From 574bdc3aefc489af0d436d7c75ffe8eab656770e Mon Sep 17 00:00:00 2001 From: "Li, Fei1" Date: Thu, 24 May 2018 16:27:06 +0800 Subject: [PATCH] hv: panic will print function name and line number Signed-off-by: Li, Fei1 Reviewed-by: Kevin Tian --- hypervisor/include/debug/logmsg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hypervisor/include/debug/logmsg.h b/hypervisor/include/debug/logmsg.h index 5b01434e0..b51ba2290 100644 --- a/hypervisor/include/debug/logmsg.h +++ b/hypervisor/include/debug/logmsg.h @@ -102,8 +102,9 @@ static inline void print_logmsg_buffer(__unused uint32_t cpu_id) do_logmsg(lvl, pr_prefix __VA_ARGS__); \ } while (0) -#define panic(...) \ - do { pr_fatal("Instruction Decode PANIC: " __VA_ARGS__); \ +#define panic(...) \ + do { pr_fatal("PANIC: %s line: %d\n", __func__, __LINE__); \ + pr_fatal(__VA_ARGS__); \ while (1) { asm volatile ("pause" ::: "memory"); }; } while (0) #endif /* LOGMSG_H */