bug.h 572 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2015 ARM Limited
  4. * Author: Dave Martin <[email protected]>
  5. */
  6. #ifndef _ARCH_ARM64_ASM_BUG_H
  7. #define _ARCH_ARM64_ASM_BUG_H
  8. #include <linux/stringify.h>
  9. #include <asm/asm-bug.h>
  10. #define __BUG_FLAGS(flags) \
  11. asm volatile (__stringify(ASM_BUG_FLAGS(flags)));
  12. #define BUG() do { \
  13. __BUG_FLAGS(0); \
  14. unreachable(); \
  15. } while (0)
  16. #define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags))
  17. #define HAVE_ARCH_BUG
  18. #include <asm-generic/bug.h>
  19. #endif /* ! _ARCH_ARM64_ASM_BUG_H */