Skip to content

Commit

Permalink
printk: add module parameter ignore_loglevel to control ignore_loglevel
Browse files Browse the repository at this point in the history
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 can change it by:
/sys/module/printk/parameters/ignore_loglevel

Signed-off-by: Yanmin Zhang <yanmin.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Yanmin Zhang authored and Linus Torvalds committed Nov 1, 2011
1 parent 73efc03 commit 0eca6b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,9 @@ 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
Expand Down

0 comments on commit 0eca6b7

Please sign in to comment.