hv: panic will print function name and line number

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
Li, Fei1 2018-05-24 16:27:06 +08:00 committed by lijinxia
parent 1a5370a253
commit 574bdc3aef
1 changed files with 3 additions and 2 deletions

View File

@ -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 */