blob: 8a59e5a8c21727923f83e8090210a48c8e7d6ded [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _SPARC_BUG_H
2#define _SPARC_BUG_H
3
Matt Mackallc8538a72005-05-01 08:59:01 -07004#ifdef CONFIG_BUG
David S. Millere10195c2007-11-16 02:53:50 -08005#include <linux/compiler.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
7#ifdef CONFIG_DEBUG_BUGVERBOSE
8extern void do_BUG(const char *file, int line);
9#define BUG() do { \
10 do_BUG(__FILE__, __LINE__); \
David S. Millere10195c2007-11-16 02:53:50 -080011 __builtin_trap(); \
Linus Torvalds1da177e2005-04-16 15:20:36 -070012} while (0)
13#else
David S. Millere10195c2007-11-16 02:53:50 -080014#define BUG() __builtin_trap()
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#endif
16
17#define HAVE_ARCH_BUG
Matt Mackallc8538a72005-05-01 08:59:01 -070018#endif
19
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm-generic/bug.h>
21
22#endif