revert-mm-fix-blkdev-size-calculation-in-generic_write_checks
[linux-2.6/linux-trees-mm.git] / include / asm-x86 / bug.h
blobc2ea659876eec2ff11a397a50231b4abbc5c08c8
1 #ifndef _ASM_X86_BUG_H
2 #define _ASM_X86_BUG_H
4 #ifdef CONFIG_BUG
6 #ifdef CONFIG_DEBUG_BUGVERBOSE
8 #ifdef CONFIG_X86_32
9 # define __BUG_C0 "2:\t.long 1b, %c0\n"
10 #else
11 # define __BUG_C0 "2:\t.quad 1b, %c0\n"
12 #endif
14 #define BUG() \
15 do { \
16 asm volatile("1:\tud2\n" \
17 ".pushsection __bug_table,\"a\"\n" \
18 __BUG_C0 \
19 "\t.word %c1, 0\n" \
20 "\t.org 2b+%c2\n" \
21 ".popsection" \
22 : : "i" (__FILE__), "i" (__LINE__), \
23 "i" (sizeof(struct bug_entry))); \
24 for(;;) ; \
25 } while(0)
27 #else
28 #define BUG() \
29 do { \
30 asm volatile("ud2"); \
31 for(;;) ; \
32 } while(0)
33 #endif
35 #endif /* !CONFIG_BUG */
37 #include <asm-generic/bug.h>
38 #endif