bug.h 520 Bytes
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1 2 3
#ifndef _ALPHA_BUG_H
#define _ALPHA_BUG_H

4 5
#include <linux/linkage.h>

6
#ifdef CONFIG_BUG
Linus Torvalds's avatar
Linus Torvalds committed
7 8 9 10
#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
11
#define BUG()	do {							\
12 13 14 15
	__asm__ __volatile__(						\
		"call_pal %0  # bugchk\n\t"				\
		".long %1\n\t.8byte %2"					\
		: : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__));	\
Alexey Dobriyan's avatar
Alexey Dobriyan committed
16
	for ( ; ; ); } while (0)
Linus Torvalds's avatar
Linus Torvalds committed
17 18

#define HAVE_ARCH_BUG
19 20
#endif

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

#endif