David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 ARM Limited |
| 4 | * Author: Dave Martin <Dave.Martin@arm.com> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _ARCH_ARM64_ASM_BUG_H |
| 8 | #define _ARCH_ARM64_ASM_BUG_H |
| 9 | |
| 10 | #include <linux/stringify.h> |
| 11 | |
| 12 | #include <asm/asm-bug.h> |
| 13 | |
| 14 | #define __BUG_FLAGS(flags) \ |
| 15 | asm volatile (__stringify(ASM_BUG_FLAGS(flags))); |
| 16 | |
| 17 | #define BUG() do { \ |
| 18 | __BUG_FLAGS(0); \ |
| 19 | unreachable(); \ |
| 20 | } while (0) |
| 21 | |
| 22 | #define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags)) |
| 23 | |
| 24 | #define HAVE_ARCH_BUG |
| 25 | |
| 26 | #include <asm-generic/bug.h> |
| 27 | |
| 28 | #endif /* ! _ARCH_ARM64_ASM_BUG_H */ |