]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kernel.h
Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-omap-h63xx.git] / include / linux / kernel.h
index ecce4a4ccd5fd19df012ca363cd6e0de2beae9ec..396a350b87a60b79935a9b738c34783581319a2b 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/log2.h>
 #include <linux/typecheck.h>
 #include <linux/ratelimit.h>
+#include <linux/dynamic_printk.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
 
@@ -190,6 +191,30 @@ extern int kernel_text_address(unsigned long addr);
 struct pid;
 extern struct pid *session_of_pgrp(struct pid *pgrp);
 
+/*
+ * FW_BUG
+ * Add this to a message where you are sure the firmware is buggy or behaves
+ * really stupid or out of spec. Be aware that the responsible BIOS developer
+ * should be able to fix this issue or at least get a concrete idea of the
+ * problem by reading your message without the need of looking at the kernel
+ * code.
+ * 
+ * Use it for definite and high priority BIOS bugs.
+ *
+ * FW_WARN
+ * Use it for not that clear (e.g. could the kernel messed up things already?)
+ * and medium priority BIOS bugs.
+ *
+ * FW_INFO
+ * Use this one if you want to tell the user or vendor about something
+ * suspicious, but generally harmless related to the firmware.
+ *
+ * Use it for information or very low priority BIOS bugs.
+ */
+#define FW_BUG         "[Firmware Bug]: "
+#define FW_WARN                "[Firmware Warn]: "
+#define FW_INFO                "[Firmware Info]: "
+
 #ifdef CONFIG_PRINTK
 asmlinkage int vprintk(const char *fmt, va_list args)
        __attribute__ ((format (printf, 1, 0)));
@@ -213,6 +238,9 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
                { return false; }
 #endif
 
+extern int printk_needs_cpu(int cpu);
+extern void printk_tick(void);
+
 extern void asmlinkage __attribute__((format(printf, 1, 2)))
        early_printk(const char *fmt, ...);
 
@@ -235,9 +263,10 @@ extern int oops_in_progress;               /* If set, an oops, panic(), BUG() or die() is in
 extern int panic_timeout;
 extern int panic_on_oops;
 extern int panic_on_unrecovered_nmi;
-extern int tainted;
 extern const char *print_tainted(void);
-extern void add_taint(unsigned);
+extern void add_taint(unsigned flag);
+extern int test_taint(unsigned flag);
+extern unsigned long get_taint(void);
 extern int root_mountflags;
 
 /* Values used for system_state */
@@ -250,16 +279,17 @@ extern enum system_states {
        SYSTEM_SUSPEND_DISK,
 } system_state;
 
-#define TAINT_PROPRIETARY_MODULE       (1<<0)
-#define TAINT_FORCED_MODULE            (1<<1)
-#define TAINT_UNSAFE_SMP               (1<<2)
-#define TAINT_FORCED_RMMOD             (1<<3)
-#define TAINT_MACHINE_CHECK            (1<<4)
-#define TAINT_BAD_PAGE                 (1<<5)
-#define TAINT_USER                     (1<<6)
-#define TAINT_DIE                      (1<<7)
-#define TAINT_OVERRIDDEN_ACPI_TABLE    (1<<8)
-#define TAINT_WARN                     (1<<9)
+#define TAINT_PROPRIETARY_MODULE       0
+#define TAINT_FORCED_MODULE            1
+#define TAINT_UNSAFE_SMP               2
+#define TAINT_FORCED_RMMOD             3
+#define TAINT_MACHINE_CHECK            4
+#define TAINT_BAD_PAGE                 5
+#define TAINT_USER                     6
+#define TAINT_DIE                      7
+#define TAINT_OVERRIDDEN_ACPI_TABLE    8
+#define TAINT_WARN                     9
+#define TAINT_CRAP                     10
 
 extern void dump_stack(void) __cold;
 
@@ -303,8 +333,12 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
 #define pr_info(fmt, arg...) \
        printk(KERN_INFO fmt, ##arg)
 
-#ifdef DEBUG
 /* If you are writing a driver, please use dev_dbg instead */
+#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
+#define pr_debug(fmt, ...) do { \
+       dynamic_pr_debug(fmt, ##__VA_ARGS__); \
+       } while (0)
+#elif defined(DEBUG)
 #define pr_debug(fmt, arg...) \
        printk(KERN_DEBUG fmt, ##arg)
 #else