Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __ASM_BUG_H |
2 | #define __ASM_BUG_H | ||||
3 | |||||
Ralf Baechle | 63dc68a | 2006-10-16 01:38:50 +0100 | [diff] [blame] | 4 | #include <asm/sgidefs.h> |
Ralf Baechle | fdb551a | 2005-05-19 12:08:04 +0000 | [diff] [blame] | 5 | |
6 | #ifdef CONFIG_BUG | ||||
7 | |||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #include <asm/break.h> |
9 | |||||
10 | #define BUG() \ | ||||
11 | do { \ | ||||
12 | __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); \ | ||||
13 | } while (0) | ||||
Ralf Baechle | 8592d4c | 2005-10-29 19:32:38 +0100 | [diff] [blame] | 14 | |
15 | #define HAVE_ARCH_BUG | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
Ralf Baechle | 63dc68a | 2006-10-16 01:38:50 +0100 | [diff] [blame] | 17 | #if (_MIPS_ISA > _MIPS_ISA_MIPS1) |
18 | |||||
19 | #define BUG_ON(condition) \ | ||||
20 | do { \ | ||||
Atsushi Nemoto | ba755f8 | 2007-04-12 20:02:54 +0900 | [diff] [blame] | 21 | __asm__ __volatile__("tne $0, %0, %1" \ |
22 | : : "r" (condition), "i" (BRK_BUG)); \ | ||||
Ralf Baechle | 63dc68a | 2006-10-16 01:38:50 +0100 | [diff] [blame] | 23 | } while (0) |
24 | |||||
25 | #define HAVE_ARCH_BUG_ON | ||||
26 | |||||
27 | #endif /* _MIPS_ISA > _MIPS_ISA_MIPS1 */ | ||||
28 | |||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #endif |
Ralf Baechle | fdb551a | 2005-05-19 12:08:04 +0000 | [diff] [blame] | 30 | |
Ralf Baechle | ffd099b | 2005-05-19 17:05:09 +0000 | [diff] [blame] | 31 | #include <asm-generic/bug.h> |
32 | |||||
Ralf Baechle | fdb551a | 2005-05-19 12:08:04 +0000 | [diff] [blame] | 33 | #endif /* __ASM_BUG_H */ |