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