diff options
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/bug.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 506ec19a3736..7d10f962aa13 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
| @@ -3,10 +3,18 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
| 5 | 5 | ||
| 6 | #ifdef CONFIG_GENERIC_BUG | ||
| 7 | #define BUGFLAG_WARNING (1 << 0) | ||
| 8 | #define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8)) | ||
| 9 | #define BUG_GET_TAINT(bug) ((bug)->flags >> 8) | ||
| 10 | #endif | ||
| 11 | |||
| 12 | #ifndef __ASSEMBLY__ | ||
| 13 | #include <linux/kernel.h> | ||
| 14 | |||
| 6 | #ifdef CONFIG_BUG | 15 | #ifdef CONFIG_BUG |
| 7 | 16 | ||
| 8 | #ifdef CONFIG_GENERIC_BUG | 17 | #ifdef CONFIG_GENERIC_BUG |
| 9 | #ifndef __ASSEMBLY__ | ||
| 10 | struct bug_entry { | 18 | struct bug_entry { |
| 11 | #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS | 19 | #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS |
| 12 | unsigned long bug_addr; | 20 | unsigned long bug_addr; |
| @@ -23,17 +31,8 @@ struct bug_entry { | |||
| 23 | #endif | 31 | #endif |
| 24 | unsigned short flags; | 32 | unsigned short flags; |
| 25 | }; | 33 | }; |
| 26 | #endif /* __ASSEMBLY__ */ | ||
| 27 | |||
| 28 | #define BUGFLAG_WARNING (1 << 0) | ||
| 29 | #define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8)) | ||
| 30 | #define BUG_GET_TAINT(bug) ((bug)->flags >> 8) | ||
| 31 | |||
| 32 | #endif /* CONFIG_GENERIC_BUG */ | 34 | #endif /* CONFIG_GENERIC_BUG */ |
| 33 | 35 | ||
| 34 | #ifndef __ASSEMBLY__ | ||
| 35 | #include <linux/kernel.h> | ||
| 36 | |||
| 37 | /* | 36 | /* |
| 38 | * Don't use BUG() or BUG_ON() unless there's really no way out; one | 37 | * Don't use BUG() or BUG_ON() unless there's really no way out; one |
| 39 | * example might be detecting data structure corruption in the middle | 38 | * example might be detecting data structure corruption in the middle |
