xref: /openbmc/linux/arch/csky/include/asm/bug.h (revision 6607aa6f)
12ce36bfaSGuo Ren /* SPDX-License-Identifier: GPL-2.0 */
22ce36bfaSGuo Ren 
32ce36bfaSGuo Ren #ifndef __ASM_CSKY_BUG_H
42ce36bfaSGuo Ren #define __ASM_CSKY_BUG_H
52ce36bfaSGuo Ren 
62ce36bfaSGuo Ren #include <linux/compiler.h>
72ce36bfaSGuo Ren #include <linux/const.h>
82ce36bfaSGuo Ren #include <linux/types.h>
92ce36bfaSGuo Ren 
102ce36bfaSGuo Ren #define BUG()				\
112ce36bfaSGuo Ren do {					\
122ce36bfaSGuo Ren 	asm volatile ("bkpt\n");	\
132ce36bfaSGuo Ren 	unreachable();			\
142ce36bfaSGuo Ren } while (0)
152ce36bfaSGuo Ren 
162ce36bfaSGuo Ren #define HAVE_ARCH_BUG
172ce36bfaSGuo Ren 
182ce36bfaSGuo Ren #include <asm-generic/bug.h>
192ce36bfaSGuo Ren 
202ce36bfaSGuo Ren struct pt_regs;
212ce36bfaSGuo Ren 
225bc46ce2SGuo Ren void die(struct pt_regs *regs, const char *str);
23*bd0bf90eSGuo Ren void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr);
24*bd0bf90eSGuo Ren 
252ce36bfaSGuo Ren void show_regs(struct pt_regs *regs);
265bc46ce2SGuo Ren void show_code(struct pt_regs *regs);
272ce36bfaSGuo Ren 
282ce36bfaSGuo Ren #endif /* __ASM_CSKY_BUG_H */
29