2 * Copyright 2004-2009 Analog Devices Inc.
4 * Licensed under the GPL-2 or later.
7 #ifndef _BLACKFIN_BUG_H
8 #define _BLACKFIN_BUG_H
12 #define BFIN_BUG_OPCODE 0xefcd
14 #ifdef CONFIG_DEBUG_BUGVERBOSE
16 #define _BUG_OR_WARN(flags) \
19 " .section __bug_table,\"a\",@progbits\n" \
27 : "i"(BFIN_BUG_OPCODE), "i"(__FILE__), \
28 "i"(__LINE__), "i"(flags), \
29 "i"(sizeof(struct bug_entry)))
33 #define _BUG_OR_WARN(flags) \
36 " .section __bug_table,\"a\",@progbits\n" \
42 : "i"(BFIN_BUG_OPCODE), "i"(flags), \
43 "i"(sizeof(struct bug_entry)))
45 #endif /* CONFIG_DEBUG_BUGVERBOSE */
53 #define WARN_ON(condition) \
55 int __ret_warn_on = !!(condition); \
56 if (unlikely(__ret_warn_on)) \
57 _BUG_OR_WARN(BUGFLAG_WARNING); \
58 unlikely(__ret_warn_on); \
62 #define HAVE_ARCH_WARN_ON
66 #include <asm-generic/bug.h>