bug.h 659 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _M68K_BUG_H
  3. #define _M68K_BUG_H
  4. #ifdef CONFIG_MMU
  5. #ifdef CONFIG_BUG
  6. #ifdef CONFIG_DEBUG_BUGVERBOSE
  7. #ifndef CONFIG_SUN3
  8. #define BUG() do { \
  9. pr_crit("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
  10. barrier_before_unreachable(); \
  11. __builtin_trap(); \
  12. } while (0)
  13. #else
  14. #define BUG() do { \
  15. pr_crit("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
  16. barrier_before_unreachable(); \
  17. panic("BUG!"); \
  18. } while (0)
  19. #endif
  20. #else
  21. #define BUG() do { \
  22. barrier_before_unreachable(); \
  23. __builtin_trap(); \
  24. } while (0)
  25. #endif
  26. #define HAVE_ARCH_BUG
  27. #endif
  28. #endif /* CONFIG_MMU */
  29. #include <asm-generic/bug.h>
  30. #endif