xref: /kvm-unit-tests/lib/riscv/asm/bug.h (revision da49e2919f6b7e14af756e781105acaabd30f7ca)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef _ASMRISCV_BUG_H_
3 #define _ASMRISCV_BUG_H_
4 
5 #ifndef __ASSEMBLY__
6 
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