diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9687491c483f..6803318fa2ea 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
17 | #include <linux/typecheck.h> | 17 | #include <linux/typecheck.h> |
18 | #include <linux/ratelimit.h> | 18 | #include <linux/ratelimit.h> |
19 | #include <linux/dynamic_printk.h> | ||
19 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
20 | #include <asm/bug.h> | 21 | #include <asm/bug.h> |
21 | 22 | ||
@@ -238,9 +239,10 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in | |||
238 | extern int panic_timeout; | 239 | extern int panic_timeout; |
239 | extern int panic_on_oops; | 240 | extern int panic_on_oops; |
240 | extern int panic_on_unrecovered_nmi; | 241 | extern int panic_on_unrecovered_nmi; |
241 | extern int tainted; | ||
242 | extern const char *print_tainted(void); | 242 | extern const char *print_tainted(void); |
243 | extern void add_taint(unsigned); | 243 | extern void add_taint(unsigned flag); |
244 | extern int test_taint(unsigned flag); | ||
245 | extern unsigned long get_taint(void); | ||
244 | extern int root_mountflags; | 246 | extern int root_mountflags; |
245 | 247 | ||
246 | /* Values used for system_state */ | 248 | /* Values used for system_state */ |
@@ -253,16 +255,16 @@ extern enum system_states { | |||
253 | SYSTEM_SUSPEND_DISK, | 255 | SYSTEM_SUSPEND_DISK, |
254 | } system_state; | 256 | } system_state; |
255 | 257 | ||
256 | #define TAINT_PROPRIETARY_MODULE (1<<0) | 258 | #define TAINT_PROPRIETARY_MODULE 0 |
257 | #define TAINT_FORCED_MODULE (1<<1) | 259 | #define TAINT_FORCED_MODULE 1 |
258 | #define TAINT_UNSAFE_SMP (1<<2) | 260 | #define TAINT_UNSAFE_SMP 2 |
259 | #define TAINT_FORCED_RMMOD (1<<3) | 261 | #define TAINT_FORCED_RMMOD 3 |
260 | #define TAINT_MACHINE_CHECK (1<<4) | 262 | #define TAINT_MACHINE_CHECK 4 |
261 | #define TAINT_BAD_PAGE (1<<5) | 263 | #define TAINT_BAD_PAGE 5 |
262 | #define TAINT_USER (1<<6) | 264 | #define TAINT_USER 6 |
263 | #define TAINT_DIE (1<<7) | 265 | #define TAINT_DIE 7 |
264 | #define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8) | 266 | #define TAINT_OVERRIDDEN_ACPI_TABLE 8 |
265 | #define TAINT_WARN (1<<9) | 267 | #define TAINT_WARN 9 |
266 | 268 | ||
267 | extern void dump_stack(void) __cold; | 269 | extern void dump_stack(void) __cold; |
268 | 270 | ||
@@ -306,8 +308,12 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
306 | #define pr_info(fmt, arg...) \ | 308 | #define pr_info(fmt, arg...) \ |
307 | printk(KERN_INFO fmt, ##arg) | 309 | printk(KERN_INFO fmt, ##arg) |
308 | 310 | ||
309 | #ifdef DEBUG | ||
310 | /* If you are writing a driver, please use dev_dbg instead */ | 311 | /* If you are writing a driver, please use dev_dbg instead */ |
312 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
313 | #define pr_debug(fmt, ...) do { \ | ||
314 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ | ||
315 | } while (0) | ||
316 | #elif defined(DEBUG) | ||
311 | #define pr_debug(fmt, arg...) \ | 317 | #define pr_debug(fmt, arg...) \ |
312 | printk(KERN_DEBUG fmt, ##arg) | 318 | printk(KERN_DEBUG fmt, ##arg) |
313 | #else | 319 | #else |