2019-06-03 13:44:50 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-07-26 21:41:40 +08:00
|
|
|
#ifndef __ASM_ASM_BUG_H
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 ARM Limited
|
|
|
|
*/
|
|
|
|
#define __ASM_ASM_BUG_H
|
|
|
|
|
|
|
|
#include <asm/brk-imm.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
|
|
|
#define _BUGVERBOSE_LOCATION(file, line) __BUGVERBOSE_LOCATION(file, line)
|
|
|
|
#define __BUGVERBOSE_LOCATION(file, line) \
|
|
|
|
.pushsection .rodata.str,"aMS",@progbits,1; \
|
2017-10-25 01:40:36 +08:00
|
|
|
14472: .string file; \
|
2017-07-26 21:41:40 +08:00
|
|
|
.popsection; \
|
|
|
|
\
|
2017-10-25 01:40:36 +08:00
|
|
|
.long 14472b - 14470b; \
|
2017-07-26 21:41:40 +08:00
|
|
|
.short line;
|
|
|
|
#else
|
|
|
|
#define _BUGVERBOSE_LOCATION(file, line)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_GENERIC_BUG
|
|
|
|
|
|
|
|
#define __BUG_ENTRY(flags) \
|
|
|
|
.pushsection __bug_table,"aw"; \
|
|
|
|
.align 2; \
|
2017-10-25 01:40:36 +08:00
|
|
|
14470: .long 14471f - 14470b; \
|
2017-07-26 21:41:40 +08:00
|
|
|
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
|
|
|
|
.short flags; \
|
|
|
|
.popsection; \
|
2017-10-25 01:40:36 +08:00
|
|
|
14471:
|
2017-07-26 21:41:40 +08:00
|
|
|
#else
|
|
|
|
#define __BUG_ENTRY(flags)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define ASM_BUG_FLAGS(flags) \
|
|
|
|
__BUG_ENTRY(flags) \
|
|
|
|
brk BUG_BRK_IMM
|
|
|
|
|
|
|
|
#define ASM_BUG() ASM_BUG_FLAGS(0)
|
|
|
|
|
|
|
|
#endif /* __ASM_ASM_BUG_H */
|