From 8e68a16346a3e9a64a3cb9bc21167d4ffdde3a88 Mon Sep 17 00:00:00 2001 From: Yanmin Zhang Date: Wed, 28 Sep 2011 10:50:38 +1000 Subject: [PATCH] printk: add ignore_loglevel as module parameter We are enabling some power features on medfield. To test suspend-2-RAM conveniently, we need turn on/off ignore_loglevel frequently without rebooting. Add a module parameter, so users could change it by: /sys/module/printk/parameters/ignore_loglevel Signed-off-by: Zhang Yanmin Signed-off-by: Andrew Morton <> --- Documentation/kernel-parameters.txt | 3 +++ kernel/printk.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b8e038dc41cb..45b697559947 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -973,6 +973,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ignore_loglevel [KNL] Ignore loglevel setting - this will print /all/ kernel messages to the console. Useful for debugging. + We also add it as printk module parameter, so users + could change it dynamically, usually by + /sys/module/printk/parameters/ignore_loglevel. ihash_entries= [KNL] Set number of hash buckets for inode cache. diff --git a/kernel/printk.c b/kernel/printk.c index 92d13358cea5..e62f949ec140 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -533,6 +533,8 @@ static int __init ignore_loglevel_setup(char *str) early_param("ignore_loglevel", ignore_loglevel_setup); module_param_named(ignore_loglevel, ignore_loglevel, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to" + "print all kernel messages to the console."); /* * Write out chars from start to end - 1 inclusive -- 2.39.5