blob: 7b85b7c93709f9c584b678ff9d2b3f3cb9fd5b0a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ALPHA_BUG_H
2#define _ALPHA_BUG_H
3
Andrew Mortoned6b9b92008-04-28 02:13:48 -07004#include <linux/linkage.h>
5
Matt Mackallc8538a72005-05-01 08:59:01 -07006#ifdef CONFIG_BUG
Linus Torvalds1da177e2005-04-16 15:20:36 -07007#include <asm/pal.h>
8
9/* ??? Would be nice to use .gprel32 here, but we can't be sure that the
10 function loaded the GP, so this could fail in modules. */
Ivan Kokshaysky945048c2009-01-29 14:25:20 -080011#define BUG() { \
12 __asm__ __volatile__( \
13 "call_pal %0 # bugchk\n\t" \
14 ".long %1\n\t.8byte %2" \
15 : : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__)); \
16 for ( ; ; ); }
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18#define HAVE_ARCH_BUG
Matt Mackallc8538a72005-05-01 08:59:01 -070019#endif
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include <asm-generic/bug.h>
22
23#endif