Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arm64 / include / asm / asm-bug.h
blob6e73809f6492a208feee82a678db8a3eaa6a57af
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef __ASM_ASM_BUG_H
3 /*
4 * Copyright (C) 2017 ARM Limited
5 */
6 #define __ASM_ASM_BUG_H
8 #include <asm/brk-imm.h>
10 #ifdef CONFIG_DEBUG_BUGVERBOSE
11 #define _BUGVERBOSE_LOCATION(file, line) __BUGVERBOSE_LOCATION(file, line)
12 #define __BUGVERBOSE_LOCATION(file, line) \
13 .pushsection .rodata.str,"aMS",@progbits,1; \
14 14472: .string file; \
15 .popsection; \
17 .long 14472b - .; \
18 .short line;
19 #else
20 #define _BUGVERBOSE_LOCATION(file, line)
21 #endif
23 #ifdef CONFIG_GENERIC_BUG
25 #define __BUG_ENTRY(flags) \
26 .pushsection __bug_table,"aw"; \
27 .align 2; \
28 14470: .long 14471f - .; \
29 _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
30 .short flags; \
31 .align 2; \
32 .popsection; \
33 14471:
34 #else
35 #define __BUG_ENTRY(flags)
36 #endif
38 #define ASM_BUG_FLAGS(flags) \
39 __BUG_ENTRY(flags) \
40 brk BUG_BRK_IMM
42 #define ASM_BUG() ASM_BUG_FLAGS(0)
44 #endif /* __ASM_ASM_BUG_H */