18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ALPHA_BUG_H 38c2ecf20Sopenharmony_ci#define _ALPHA_BUG_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/linkage.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifdef CONFIG_BUG 88c2ecf20Sopenharmony_ci#include <asm/pal.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* ??? Would be nice to use .gprel32 here, but we can't be sure that the 118c2ecf20Sopenharmony_ci function loaded the GP, so this could fail in modules. */ 128c2ecf20Sopenharmony_ci#define BUG() do { \ 138c2ecf20Sopenharmony_ci __asm__ __volatile__( \ 148c2ecf20Sopenharmony_ci "call_pal %0 # bugchk\n\t" \ 158c2ecf20Sopenharmony_ci ".long %1\n\t.8byte %2" \ 168c2ecf20Sopenharmony_ci : : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__)); \ 178c2ecf20Sopenharmony_ci unreachable(); \ 188c2ecf20Sopenharmony_ci } while (0) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define HAVE_ARCH_BUG 218c2ecf20Sopenharmony_ci#endif 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#include <asm-generic/bug.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#endif 26