^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 _ALPHA_BUG_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _ALPHA_BUG_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/linkage.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #ifdef CONFIG_BUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #include <asm/pal.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) /* ??? Would be nice to use .gprel32 here, but we can't be sure that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) function loaded the GP, so this could fail in modules. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define BUG() do { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) __asm__ __volatile__( \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) "call_pal %0 # bugchk\n\t" \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) ".long %1\n\t.8byte %2" \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) : : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__)); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) unreachable(); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) } while (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define HAVE_ARCH_BUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include <asm-generic/bug.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #endif