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