x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / arch / x86 / include / asm / bug.h
blobba38ebbaced3cd0224caef932f3f59a5cc2cc5cf
1 #ifndef _ASM_X86_BUG_H
2 #define _ASM_X86_BUG_H
4 #define HAVE_ARCH_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.long 1b - 2b, %c0 - 2b\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 unreachable(); \
25 } while (0)
27 #else
28 #define BUG() \
29 do { \
30 asm volatile("ud2"); \
31 unreachable(); \
32 } while (0)
33 #endif
35 #include <asm-generic/bug.h>
37 #endif /* _ASM_X86_BUG_H */