blob: 4d88425a41693e3778a62250bf09eac6446b1d3d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ASMARM_BUG_H
2#define _ASMARM_BUG_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
Matt Mackallc8538a72005-05-01 08:59:01 -07005#ifdef CONFIG_BUG
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#ifdef CONFIG_DEBUG_BUGVERBOSE
Nicolas Pitre7174d852006-12-07 19:09:20 +01007extern void __bug(const char *file, int line) __attribute__((noreturn));
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
9/* give file/line information */
Nicolas Pitre7174d852006-12-07 19:09:20 +010010#define BUG() __bug(__FILE__, __LINE__)
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
12#else
13
14/* this just causes an oops */
Nicolas Pitred81030a2008-08-21 23:09:48 +010015#define BUG() do { *(int *)0 = 0; } while (1)
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17#endif
18
19#define HAVE_ARCH_BUG
Matt Mackallc8538a72005-05-01 08:59:01 -070020#endif
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <asm-generic/bug.h>
23
24#endif