xref: /kvm-unit-tests/lib/riscv/asm/bug.h (revision 0cc3a351b925928827baa4b69cf0e46ff5837083)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef _ASMRISCV_BUG_H_
3 #define _ASMRISCV_BUG_H_
4 
5 #ifndef __ASSEMBLER__
6 
bug(void)7 static inline void bug(void)
8 {
9 	asm volatile("ebreak");
10 }
11 
12 #else
13 
14 .macro bug
15 	ebreak
16 .endm
17 
18 #endif
19 
20 #endif /* _ASMRISCV_BUG_H_ */
21