aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h38
1 files changed, 24 insertions, 14 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 2651f805ba6d..5a566b705ca9 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
183extern int get_option(char **str, int *pint); 184extern int get_option(char **str, int *pint);
184extern char *get_options(const char *str, int nints, int *ints); 185extern char *get_options(const char *str, int nints, int *ints);
185extern unsigned long long memparse(char *ptr, char **retptr); 186extern unsigned long long memparse(const char *ptr, char **retptr);
186 187
187extern int core_kernel_text(unsigned long addr); 188extern int core_kernel_text(unsigned long addr);
188extern int __kernel_text_address(unsigned long addr); 189extern 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
217extern int printk_needs_cpu(int cpu);
218extern void printk_tick(void);
219
216extern void asmlinkage __attribute__((format(printf, 1, 2))) 220extern 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
235extern int panic_timeout; 239extern int panic_timeout;
236extern int panic_on_oops; 240extern int panic_on_oops;
237extern int panic_on_unrecovered_nmi; 241extern int panic_on_unrecovered_nmi;
238extern int tainted;
239extern const char *print_tainted(void); 242extern const char *print_tainted(void);
240extern void add_taint(unsigned); 243extern void add_taint(unsigned flag);
244extern int test_taint(unsigned flag);
245extern unsigned long get_taint(void);
241extern int root_mountflags; 246extern int root_mountflags;
242 247
243/* Values used for system_state */ 248/* Values used for system_state */
@@ -250,16 +255,17 @@ 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
268#define TAINT_CRAP 10
263 269
264extern void dump_stack(void) __cold; 270extern void dump_stack(void) __cold;
265 271
@@ -303,8 +309,12 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
303#define pr_info(fmt, arg...) \ 309#define pr_info(fmt, arg...) \
304 printk(KERN_INFO fmt, ##arg) 310 printk(KERN_INFO fmt, ##arg)
305 311
306#ifdef DEBUG
307/* If you are writing a driver, please use dev_dbg instead */ 312/* If you are writing a driver, please use dev_dbg instead */
313#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
314#define pr_debug(fmt, ...) do { \
315 dynamic_pr_debug(fmt, ##__VA_ARGS__); \
316 } while (0)
317#elif defined(DEBUG)
308#define pr_debug(fmt, arg...) \ 318#define pr_debug(fmt, arg...) \
309 printk(KERN_DEBUG fmt, ##arg) 319 printk(KERN_DEBUG fmt, ##arg)
310#else 320#else