2019-06-03 07:44:50 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2015-07-24 16:37:48 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2015 ARM Limited
|
|
|
|
|
* Author: Dave Martin <Dave.Martin@arm.com>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _ARCH_ARM64_ASM_BUG_H
|
|
|
|
|
#define _ARCH_ARM64_ASM_BUG_H
|
|
|
|
|
|
2017-07-26 14:41:40 +01:00
|
|
|
#include <linux/stringify.h>
|
2015-07-24 16:37:48 +01:00
|
|
|
|
2017-07-26 14:41:40 +01:00
|
|
|
#include <asm/asm-bug.h>
|
2017-03-14 22:39:21 +01:00
|
|
|
|
|
|
|
|
#define __BUG_FLAGS(flags) \
|
2017-07-26 14:41:40 +01:00
|
|
|
asm volatile (__stringify(ASM_BUG_FLAGS(flags)));
|
2017-03-14 22:39:21 +01:00
|
|
|
|
|
|
|
|
#define BUG() do { \
|
|
|
|
|
__BUG_FLAGS(0); \
|
|
|
|
|
unreachable(); \
|
2015-07-24 16:37:48 +01:00
|
|
|
} while (0)
|
|
|
|
|
|
2017-05-05 12:11:37 -07:00
|
|
|
#define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
|
2015-07-24 16:37:48 +01:00
|
|
|
|
2017-03-14 22:39:21 +01:00
|
|
|
#define HAVE_ARCH_BUG
|
2015-07-24 16:37:48 +01:00
|
|
|
|
|
|
|
|
#include <asm-generic/bug.h>
|
|
|
|
|
|
|
|
|
|
#endif /* ! _ARCH_ARM64_ASM_BUG_H */
|