aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-28 11:54:49 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-28 11:54:49 -0400
commitd1a76187a5be4f89c6cb19d800cb5fb7aac735c5 (patch)
tree2fac3ffbfffc7560eeef8364b541d0d7a0057920 /include/linux/kernel.h
parentc7e78cff6b7518212247fb20b1dc6411540dc9af (diff)
parent0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff)
Merge commit 'v2.6.28-rc2' into core/locking
Conflicts: arch/um/include/asm/system.h
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h67
1 files changed, 53 insertions, 14 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e580ec09576..fa2853b49f7 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
@@ -191,7 +192,7 @@ extern int vsscanf(const char *, const char *, va_list)
191 192
192extern int get_option(char **str, int *pint); 193extern int get_option(char **str, int *pint);
193extern char *get_options(const char *str, int nints, int *ints); 194extern char *get_options(const char *str, int nints, int *ints);
194extern unsigned long long memparse(char *ptr, char **retptr); 195extern unsigned long long memparse(const char *ptr, char **retptr);
195 196
196extern int core_kernel_text(unsigned long addr); 197extern int core_kernel_text(unsigned long addr);
197extern int __kernel_text_address(unsigned long addr); 198extern int __kernel_text_address(unsigned long addr);
@@ -199,6 +200,30 @@ extern int kernel_text_address(unsigned long addr);
199struct pid; 200struct pid;
200extern struct pid *session_of_pgrp(struct pid *pgrp); 201extern struct pid *session_of_pgrp(struct pid *pgrp);
201 202
203/*
204 * FW_BUG
205 * Add this to a message where you are sure the firmware is buggy or behaves
206 * really stupid or out of spec. Be aware that the responsible BIOS developer
207 * should be able to fix this issue or at least get a concrete idea of the
208 * problem by reading your message without the need of looking at the kernel
209 * code.
210 *
211 * Use it for definite and high priority BIOS bugs.
212 *
213 * FW_WARN
214 * Use it for not that clear (e.g. could the kernel messed up things already?)
215 * and medium priority BIOS bugs.
216 *
217 * FW_INFO
218 * Use this one if you want to tell the user or vendor about something
219 * suspicious, but generally harmless related to the firmware.
220 *
221 * Use it for information or very low priority BIOS bugs.
222 */
223#define FW_BUG "[Firmware Bug]: "
224#define FW_WARN "[Firmware Warn]: "
225#define FW_INFO "[Firmware Info]: "
226
202#ifdef CONFIG_PRINTK 227#ifdef CONFIG_PRINTK
203asmlinkage int vprintk(const char *fmt, va_list args) 228asmlinkage int vprintk(const char *fmt, va_list args)
204 __attribute__ ((format (printf, 1, 0))); 229 __attribute__ ((format (printf, 1, 0)));
@@ -222,6 +247,9 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
222 { return false; } 247 { return false; }
223#endif 248#endif
224 249
250extern int printk_needs_cpu(int cpu);
251extern void printk_tick(void);
252
225extern void asmlinkage __attribute__((format(printf, 1, 2))) 253extern void asmlinkage __attribute__((format(printf, 1, 2)))
226 early_printk(const char *fmt, ...); 254 early_printk(const char *fmt, ...);
227 255
@@ -244,9 +272,10 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in
244extern int panic_timeout; 272extern int panic_timeout;
245extern int panic_on_oops; 273extern int panic_on_oops;
246extern int panic_on_unrecovered_nmi; 274extern int panic_on_unrecovered_nmi;
247extern int tainted;
248extern const char *print_tainted(void); 275extern const char *print_tainted(void);
249extern void add_taint(unsigned); 276extern void add_taint(unsigned flag);
277extern int test_taint(unsigned flag);
278extern unsigned long get_taint(void);
250extern int root_mountflags; 279extern int root_mountflags;
251 280
252/* Values used for system_state */ 281/* Values used for system_state */
@@ -259,16 +288,17 @@ extern enum system_states {
259 SYSTEM_SUSPEND_DISK, 288 SYSTEM_SUSPEND_DISK,
260} system_state; 289} system_state;
261 290
262#define TAINT_PROPRIETARY_MODULE (1<<0) 291#define TAINT_PROPRIETARY_MODULE 0
263#define TAINT_FORCED_MODULE (1<<1) 292#define TAINT_FORCED_MODULE 1
264#define TAINT_UNSAFE_SMP (1<<2) 293#define TAINT_UNSAFE_SMP 2
265#define TAINT_FORCED_RMMOD (1<<3) 294#define TAINT_FORCED_RMMOD 3
266#define TAINT_MACHINE_CHECK (1<<4) 295#define TAINT_MACHINE_CHECK 4
267#define TAINT_BAD_PAGE (1<<5) 296#define TAINT_BAD_PAGE 5
268#define TAINT_USER (1<<6) 297#define TAINT_USER 6
269#define TAINT_DIE (1<<7) 298#define TAINT_DIE 7
270#define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8) 299#define TAINT_OVERRIDDEN_ACPI_TABLE 8
271#define TAINT_WARN (1<<9) 300#define TAINT_WARN 9
301#define TAINT_CRAP 10
272 302
273extern void dump_stack(void) __cold; 303extern void dump_stack(void) __cold;
274 304
@@ -312,8 +342,12 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
312#define pr_info(fmt, arg...) \ 342#define pr_info(fmt, arg...) \
313 printk(KERN_INFO fmt, ##arg) 343 printk(KERN_INFO fmt, ##arg)
314 344
315#ifdef DEBUG
316/* If you are writing a driver, please use dev_dbg instead */ 345/* If you are writing a driver, please use dev_dbg instead */
346#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
347#define pr_debug(fmt, ...) do { \
348 dynamic_pr_debug(fmt, ##__VA_ARGS__); \
349 } while (0)
350#elif defined(DEBUG)
317#define pr_debug(fmt, arg...) \ 351#define pr_debug(fmt, arg...) \
318 printk(KERN_DEBUG fmt, ##arg) 352 printk(KERN_DEBUG fmt, ##arg)
319#else 353#else
@@ -495,4 +529,9 @@ struct sysinfo {
495#define NUMA_BUILD 0 529#define NUMA_BUILD 0
496#endif 530#endif
497 531
532/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */
533#ifdef CONFIG_FTRACE_MCOUNT_RECORD
534# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD
535#endif
536
498#endif 537#endif