bug.h 588 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _SPARC_BUG_H
  3. #define _SPARC_BUG_H
  4. #ifdef CONFIG_BUG
  5. #include <linux/compiler.h>
  6. #ifdef CONFIG_DEBUG_BUGVERBOSE
  7. void do_BUG(const char *file, int line);
  8. #define BUG() do { \
  9. do_BUG(__FILE__, __LINE__); \
  10. barrier_before_unreachable(); \
  11. __builtin_trap(); \
  12. } while (0)
  13. #else
  14. #define BUG() do { \
  15. barrier_before_unreachable(); \
  16. __builtin_trap(); \
  17. } while (0)
  18. #endif
  19. #define HAVE_ARCH_BUG
  20. #endif
  21. #include <asm-generic/bug.h>
  22. struct pt_regs;
  23. void __noreturn die_if_kernel(char *str, struct pt_regs *regs);
  24. #endif