diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:54:49 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:54:49 -0400 |
| commit | d1a76187a5be4f89c6cb19d800cb5fb7aac735c5 (patch) | |
| tree | 2fac3ffbfffc7560eeef8364b541d0d7a0057920 /include/linux/kernel.h | |
| parent | c7e78cff6b7518212247fb20b1dc6411540dc9af (diff) | |
| parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (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.h | 67 |
1 files changed, 53 insertions, 14 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e580ec095765..fa2853b49f70 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 | ||
| 192 | extern int get_option(char **str, int *pint); | 193 | extern int get_option(char **str, int *pint); |
| 193 | extern char *get_options(const char *str, int nints, int *ints); | 194 | extern char *get_options(const char *str, int nints, int *ints); |
| 194 | extern unsigned long long memparse(char *ptr, char **retptr); | 195 | extern unsigned long long memparse(const char *ptr, char **retptr); |
| 195 | 196 | ||
| 196 | extern int core_kernel_text(unsigned long addr); | 197 | extern int core_kernel_text(unsigned long addr); |
| 197 | extern int __kernel_text_address(unsigned long addr); | 198 | extern int __kernel_text_address(unsigned long addr); |
| @@ -199,6 +200,30 @@ extern int kernel_text_address(unsigned long addr); | |||
| 199 | struct pid; | 200 | struct pid; |
| 200 | extern struct pid *session_of_pgrp(struct pid *pgrp); | 201 | extern 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 |
| 203 | asmlinkage int vprintk(const char *fmt, va_list args) | 228 | asmlinkage 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 | ||
| 250 | extern int printk_needs_cpu(int cpu); | ||
| 251 | extern void printk_tick(void); | ||
| 252 | |||
| 225 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | 253 | extern 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 | |||
| 244 | extern int panic_timeout; | 272 | extern int panic_timeout; |
| 245 | extern int panic_on_oops; | 273 | extern int panic_on_oops; |
| 246 | extern int panic_on_unrecovered_nmi; | 274 | extern int panic_on_unrecovered_nmi; |
| 247 | extern int tainted; | ||
| 248 | extern const char *print_tainted(void); | 275 | extern const char *print_tainted(void); |
| 249 | extern void add_taint(unsigned); | 276 | extern void add_taint(unsigned flag); |
| 277 | extern int test_taint(unsigned flag); | ||
| 278 | extern unsigned long get_taint(void); | ||
| 250 | extern int root_mountflags; | 279 | extern 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 | ||
| 273 | extern void dump_stack(void) __cold; | 303 | extern 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 |
