blob: 1720c8ad86fec780ca054e42ed8baaa21735e899 [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. */
Alexey Dobriyanfb9a6802009-02-04 15:12:21 -080011#define BUG() do { \
Ivan Kokshaysky945048c2009-01-29 14:25:20 -080012 __asm__ __volatile__( \
13 "call_pal %0 # bugchk\n\t" \
14 ".long %1\n\t.8byte %2" \
15 : : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__)); \
Alexey Dobriyanfb9a6802009-02-04 15:12:21 -080016 for ( ; ; ); } while (0)
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