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