bug.h 571 Bytes
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds's avatar
Linus Torvalds committed
2 3 4
#ifndef _ALPHA_BUG_H
#define _ALPHA_BUG_H

5 6
#include <linux/linkage.h>

7
#ifdef CONFIG_BUG
Linus Torvalds's avatar
Linus Torvalds committed
8 9 10 11
#include <asm/pal.h>

/* ??? Would be nice to use .gprel32 here, but we can't be sure that the
   function loaded the GP, so this could fail in modules.  */
Alexey Dobriyan's avatar
Alexey Dobriyan committed
12
#define BUG()	do {							\
13 14 15 16
	__asm__ __volatile__(						\
		"call_pal %0  # bugchk\n\t"				\
		".long %1\n\t.8byte %2"					\
		: : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__));	\
17 18
	unreachable();							\
  } while (0)
Linus Torvalds's avatar
Linus Torvalds committed
19 20

#define HAVE_ARCH_BUG
21 22
#endif

Linus Torvalds's avatar
Linus Torvalds committed
23 24 25
#include <asm-generic/bug.h>

#endif