]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] add ignore_loglevel boot option
authorIngo Molnar <mingo@elte.hu>
Thu, 7 Dec 2006 04:40:51 +0000 (20:40 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 16:39:47 +0000 (08:39 -0800)
Sometimes the kernel prints something interesting while userspace bootup
keeps messages turned off via loglevel.  Enable the printing of /all/
kernel messages via the "ignore_loglevel" boot option.  Off by default.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Documentation/kernel-parameters.txt
kernel/printk.c

index 2a40d9f6ffad1b72f9225c870b7f062d5b85a23d..6b3c3e37a27759ae97753e5944a59630c1fe4ada 100644 (file)
@@ -650,6 +650,10 @@ and is between 256 and 4096 characters. It is defined in the file
        idle=           [HW]
                        Format: idle=poll or idle=halt
 
+       ignore_loglevel [KNL]
+                       Ignore loglevel setting - this will print /all/
+                       kernel messages to the console. Useful for debugging.
+
        ihash_entries=  [KNL]
                        Set number of hash buckets for inode cache.
 
index c3d90a58e4c59a3c06ebace24b25c532617e23c9..185bb45eacf7289db6b99039634ad9f9f6fa5d96 100644 (file)
@@ -333,13 +333,25 @@ static void __call_console_drivers(unsigned long start, unsigned long end)
        }
 }
 
+static int __read_mostly ignore_loglevel;
+
+int __init ignore_loglevel_setup(char *str)
+{
+       ignore_loglevel = 1;
+       printk(KERN_INFO "debug: ignoring loglevel setting.\n");
+
+       return 1;
+}
+
+__setup("ignore_loglevel", ignore_loglevel_setup);
+
 /*
  * Write out chars from start to end - 1 inclusive
  */
 static void _call_console_drivers(unsigned long start,
                                unsigned long end, int msg_log_level)
 {
-       if (msg_log_level < console_loglevel &&
+       if ((msg_log_level < console_loglevel || ignore_loglevel) &&
                        console_drivers && start != end) {
                if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
                        /* wrapped write */