Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _ALPHA_BUG_H |
| 2 | #define _ALPHA_BUG_H |
| 3 | |
Andrew Morton | ed6b9b9 | 2008-04-28 02:13:48 -0700 | [diff] [blame] | 4 | #include <linux/linkage.h> |
| 5 | |
Matt Mackall | c8538a7 | 2005-05-01 08:59:01 -0700 | [diff] [blame] | 6 | #ifdef CONFIG_BUG |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | #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 Dobriyan | fb9a680 | 2009-02-04 15:12:21 -0800 | [diff] [blame] | 11 | #define BUG() do { \ |
Ivan Kokshaysky | 945048c | 2009-01-29 14:25:20 -0800 | [diff] [blame] | 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__)); \ |
David Daney | acadbfb | 2009-12-10 18:07:24 -0500 | [diff] [blame] | 16 | unreachable(); \ |
| 17 | } while (0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | #define HAVE_ARCH_BUG |
Matt Mackall | c8538a7 | 2005-05-01 08:59:01 -0700 | [diff] [blame] | 20 | #endif |
| 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #include <asm-generic/bug.h> |
| 23 | |
| 24 | #endif |