Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / arm64 / include / asm / asm-bug.h
blobb3552c4a405f28a2c2791d30190bdc7540bcd2ab
1 #ifndef __ASM_ASM_BUG_H
2 /*
3 * Copyright (C) 2017 ARM Limited
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #define __ASM_ASM_BUG_H
19 #include <asm/brk-imm.h>
21 #ifdef CONFIG_DEBUG_BUGVERBOSE
22 #define _BUGVERBOSE_LOCATION(file, line) __BUGVERBOSE_LOCATION(file, line)
23 #define __BUGVERBOSE_LOCATION(file, line) \
24 .pushsection .rodata.str,"aMS",@progbits,1; \
25 14472: .string file; \
26 .popsection; \
28 .long 14472b - 14470b; \
29 .short line;
30 #else
31 #define _BUGVERBOSE_LOCATION(file, line)
32 #endif
34 #ifdef CONFIG_GENERIC_BUG
36 #define __BUG_ENTRY(flags) \
37 .pushsection __bug_table,"aw"; \
38 .align 2; \
39 14470: .long 14471f - 14470b; \
40 _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
41 .short flags; \
42 .popsection; \
43 14471:
44 #else
45 #define __BUG_ENTRY(flags)
46 #endif
48 #define ASM_BUG_FLAGS(flags) \
49 __BUG_ENTRY(flags) \
50 brk BUG_BRK_IMM
52 #define ASM_BUG() ASM_BUG_FLAGS(0)
54 #endif /* __ASM_ASM_BUG_H */