summaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@linux01.gwdg.de>2006-06-25 14:48:15 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 19:01:13 +0200
commit3b9c04106b70e46803c69d13d5da32f6129fa76d (patch)
treeb0405d1823ea30cdc07cd5ab5361d39b262e531e /kernel/printk.c
parent[PATCH] radixtree: normalize radix_tree_tag_get() return value (diff)
downloadlinux-3b9c04106b70e46803c69d13d5da32f6129fa76d.tar.xz
linux-3b9c04106b70e46803c69d13d5da32f6129fa76d.zip
[PATCH] printk time parameter
Currently, enabling/disabling printk timestamps is only possible through reboot (bootparam) or recompile. I normally do not run with timestamps (since syslog handles that in a good manner), but for measuring small kernel delays (e.g. irq probing - see parport thread) I needed subsecond precision, but then again, just for some minutes rather than all kernel messages to come. The following patch adds a module_param() with which the timestamps can be en-/disabled in a live system through /sys/modules/printk/parameters/printk_time. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 6b89dd9d11b6..95b7fe17f124 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -24,6 +24,7 @@
#include <linux/console.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/interrupt.h> /* For in_interrupt() */
#include <linux/config.h>
#include <linux/delay.h>
@@ -439,6 +440,7 @@ static int printk_time = 1;
#else
static int printk_time = 0;
#endif
+module_param(printk_time, int, S_IRUGO | S_IWUSR);
static int __init printk_time_setup(char *str)
{