diff options
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2651f805ba6d..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 | ||
| @@ -182,7 +183,7 @@ extern int vsscanf(const char *, const char *, va_list) | |||
| 182 | 183 | ||
| 183 | extern int get_option(char **str, int *pint); | 184 | extern int get_option(char **str, int *pint); |
| 184 | extern char *get_options(const char *str, int nints, int *ints); | 185 | extern char *get_options(const char *str, int nints, int *ints); |
| 185 | extern unsigned long long memparse(char *ptr, char **retptr); | 186 | extern unsigned long long memparse(const char *ptr, char **retptr); |
| 186 | 187 | ||
| 187 | extern int core_kernel_text(unsigned long addr); | 188 | extern int core_kernel_text(unsigned long addr); |
| 188 | extern int __kernel_text_address(unsigned long addr); | 189 | extern int __kernel_text_address(unsigned long addr); |
| @@ -213,6 +214,9 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | |||
| 213 | { return false; } | 214 | { return false; } |
| 214 | #endif | 215 | #endif |
| 215 | 216 | ||
| 217 | extern int printk_needs_cpu(int cpu); | ||
| 218 | extern void printk_tick(void); | ||
| 219 | |||
| 216 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | 220 | extern void asmlinkage __attribute__((format(printf, 1, 2))) |
| 217 | early_printk(const char *fmt, ...); | 221 | early_printk(const char *fmt, ...); |
| 218 | 222 | ||
| @@ -235,9 +239,10 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in | |||
| 235 | extern int panic_timeout; | 239 | extern int panic_timeout; |
| 236 | extern int panic_on_oops; | 240 | extern int panic_on_oops; |
| 237 | extern int panic_on_unrecovered_nmi; | 241 | extern int panic_on_unrecovered_nmi; |
| 238 | extern int tainted; | ||
| 239 | extern const char *print_tainted(void); | 242 | extern const char *print_tainted(void); |
| 240 | 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); | ||
| 241 | extern int root_mountflags; | 246 | extern int root_mountflags; |
| 242 | 247 | ||
| 243 | /* Values used for system_state */ | 248 | /* Values used for system_state */ |
| @@ -250,16 +255,16 @@ extern enum system_states { | |||
| 250 | SYSTEM_SUSPEND_DISK, | 255 | SYSTEM_SUSPEND_DISK, |
| 251 | } system_state; | 256 | } system_state; |
| 252 | 257 | ||
| 253 | #define TAINT_PROPRIETARY_MODULE (1<<0) | 258 | #define TAINT_PROPRIETARY_MODULE 0 |
| 254 | #define TAINT_FORCED_MODULE (1<<1) | 259 | #define TAINT_FORCED_MODULE 1 |
| 255 | #define TAINT_UNSAFE_SMP (1<<2) | 260 | #define TAINT_UNSAFE_SMP 2 |
| 256 | #define TAINT_FORCED_RMMOD (1<<3) | 261 | #define TAINT_FORCED_RMMOD 3 |
| 257 | #define TAINT_MACHINE_CHECK (1<<4) | 262 | #define TAINT_MACHINE_CHECK 4 |
| 258 | #define TAINT_BAD_PAGE (1<<5) | 263 | #define TAINT_BAD_PAGE 5 |
| 259 | #define TAINT_USER (1<<6) | 264 | #define TAINT_USER 6 |
| 260 | #define TAINT_DIE (1<<7) | 265 | #define TAINT_DIE 7 |
| 261 | #define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8) | 266 | #define TAINT_OVERRIDDEN_ACPI_TABLE 8 |
| 262 | #define TAINT_WARN (1<<9) | 267 | #define TAINT_WARN 9 |
| 263 | 268 | ||
| 264 | extern void dump_stack(void) __cold; | 269 | extern void dump_stack(void) __cold; |
| 265 | 270 | ||
| @@ -303,8 +308,12 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 303 | #define pr_info(fmt, arg...) \ | 308 | #define pr_info(fmt, arg...) \ |
| 304 | printk(KERN_INFO fmt, ##arg) | 309 | printk(KERN_INFO fmt, ##arg) |
| 305 | 310 | ||
| 306 | #ifdef DEBUG | ||
| 307 | /* 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) | ||
| 308 | #define pr_debug(fmt, arg...) \ | 317 | #define pr_debug(fmt, arg...) \ |
| 309 | printk(KERN_DEBUG fmt, ##arg) | 318 | printk(KERN_DEBUG fmt, ##arg) |
| 310 | #else | 319 | #else |
