diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | kernel/printk.c | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 2a40d9f6ffad..6b3c3e37a277 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -650,6 +650,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
650 | idle= [HW] | 650 | idle= [HW] |
651 | Format: idle=poll or idle=halt | 651 | Format: idle=poll or idle=halt |
652 | 652 | ||
653 | ignore_loglevel [KNL] | ||
654 | Ignore loglevel setting - this will print /all/ | ||
655 | kernel messages to the console. Useful for debugging. | ||
656 | |||
653 | ihash_entries= [KNL] | 657 | ihash_entries= [KNL] |
654 | Set number of hash buckets for inode cache. | 658 | Set number of hash buckets for inode cache. |
655 | 659 | ||
diff --git a/kernel/printk.c b/kernel/printk.c index c3d90a58e4c5..185bb45eacf7 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -333,13 +333,25 @@ static void __call_console_drivers(unsigned long start, unsigned long end) | |||
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
336 | static int __read_mostly ignore_loglevel; | ||
337 | |||
338 | int __init ignore_loglevel_setup(char *str) | ||
339 | { | ||
340 | ignore_loglevel = 1; | ||
341 | printk(KERN_INFO "debug: ignoring loglevel setting.\n"); | ||
342 | |||
343 | return 1; | ||
344 | } | ||
345 | |||
346 | __setup("ignore_loglevel", ignore_loglevel_setup); | ||
347 | |||
336 | /* | 348 | /* |
337 | * Write out chars from start to end - 1 inclusive | 349 | * Write out chars from start to end - 1 inclusive |
338 | */ | 350 | */ |
339 | static void _call_console_drivers(unsigned long start, | 351 | static void _call_console_drivers(unsigned long start, |
340 | unsigned long end, int msg_log_level) | 352 | unsigned long end, int msg_log_level) |
341 | { | 353 | { |
342 | if (msg_log_level < console_loglevel && | 354 | if ((msg_log_level < console_loglevel || ignore_loglevel) && |
343 | console_drivers && start != end) { | 355 | console_drivers && start != end) { |
344 | if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) { | 356 | if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) { |
345 | /* wrapped write */ | 357 | /* wrapped write */ |