Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[deliverable/linux.git] / arch / mips / include / asm / bug.h
CommitLineData
1da177e4
LT
1#ifndef __ASM_BUG_H
2#define __ASM_BUG_H
3
0ca5921e 4#include <linux/compiler.h>
63dc68a8 5#include <asm/sgidefs.h>
fdb551a4
RB
6
7#ifdef CONFIG_BUG
8
1da177e4
LT
9#include <asm/break.h>
10
8ec2e243
DD
11static inline void __noreturn BUG(void)
12{
13 __asm__ __volatile__("break %0" : : "i" (BRK_BUG));
4ef5651e 14 unreachable();
8ec2e243 15}
8592d4c0
RB
16
17#define HAVE_ARCH_BUG
1da177e4 18
63dc68a8
RB
19#if (_MIPS_ISA > _MIPS_ISA_MIPS1)
20
8ec2e243
DD
21static inline void __BUG_ON(unsigned long condition)
22{
23 if (__builtin_constant_p(condition)) {
24 if (condition)
25 BUG();
26 else
27 return;
28 }
29 __asm__ __volatile__("tne $0, %0, %1"
30 : : "r" (condition), "i" (BRK_BUG));
31}
32
33#define BUG_ON(C) __BUG_ON((unsigned long)(C))
63dc68a8
RB
34
35#define HAVE_ARCH_BUG_ON
36
37#endif /* _MIPS_ISA > _MIPS_ISA_MIPS1 */
38
1da177e4 39#endif
fdb551a4 40
ffd099bd
RB
41#include <asm-generic/bug.h>
42
fdb551a4 43#endif /* __ASM_BUG_H */
This page took 0.86576 seconds and 5 git commands to generate.