1 #ifndef __ASM_ASM_BUG_H
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; \
28 .long 14472b - 14470b; \
31 #define _BUGVERBOSE_LOCATION(file, line)
34 #ifdef CONFIG_GENERIC_BUG
36 #define __BUG_ENTRY(flags) \
37 .pushsection __bug_table,"aw"; \
39 14470: .long 14471f - 14470b; \
40 _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
45 #define __BUG_ENTRY(flags)
48 #define ASM_BUG_FLAGS(flags) \
52 #define ASM_BUG() ASM_BUG_FLAGS(0)
54 #endif /* __ASM_ASM_BUG_H */