xref: /linux/arch/csky/include/asm/bug.h (revision bd0bf90e30c4b886ec10c12498cd56d8e41aaaf3)
12ce36bfaSGuo Ren /* SPDX-License-Identifier: GPL-2.0 */
22ce36bfaSGuo Ren // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
32ce36bfaSGuo Ren 
42ce36bfaSGuo Ren #ifndef __ASM_CSKY_BUG_H
52ce36bfaSGuo Ren #define __ASM_CSKY_BUG_H
62ce36bfaSGuo Ren 
72ce36bfaSGuo Ren #include <linux/compiler.h>
82ce36bfaSGuo Ren #include <linux/const.h>
92ce36bfaSGuo Ren #include <linux/types.h>
102ce36bfaSGuo Ren 
112ce36bfaSGuo Ren #define BUG()				\
122ce36bfaSGuo Ren do {					\
132ce36bfaSGuo Ren 	asm volatile ("bkpt\n");	\
142ce36bfaSGuo Ren 	unreachable();			\
152ce36bfaSGuo Ren } while (0)
162ce36bfaSGuo Ren 
172ce36bfaSGuo Ren #define HAVE_ARCH_BUG
182ce36bfaSGuo Ren 
192ce36bfaSGuo Ren #include <asm-generic/bug.h>
202ce36bfaSGuo Ren 
212ce36bfaSGuo Ren struct pt_regs;
222ce36bfaSGuo Ren 
235bc46ce2SGuo Ren void die(struct pt_regs *regs, const char *str);
24*bd0bf90eSGuo Ren void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr);
25*bd0bf90eSGuo Ren 
262ce36bfaSGuo Ren void show_regs(struct pt_regs *regs);
275bc46ce2SGuo Ren void show_code(struct pt_regs *regs);
282ce36bfaSGuo Ren 
292ce36bfaSGuo Ren #endif /* __ASM_CSKY_BUG_H */
30