xref: /kvm-unit-tests/lib/riscv/asm/bug.h (revision 386ed5c2f9e98a2605817748c44c0cefa60dc88e)
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