diff options
author | Jan Engelhardt <jengelh@linux01.gwdg.de> | 2006-06-25 08:48:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:13 -0400 |
commit | 3b9c04106b70e46803c69d13d5da32f6129fa76d (patch) | |
tree | b0405d1823ea30cdc07cd5ab5361d39b262e531e /kernel/printk.c | |
parent | e5dcd90b53d601a04482db9800336a0ccf190880 (diff) |
[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.c | 2 |
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 @@ | |||
24 | #include <linux/console.h> | 24 | #include <linux/console.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | ||
27 | #include <linux/interrupt.h> /* For in_interrupt() */ | 28 | #include <linux/interrupt.h> /* For in_interrupt() */ |
28 | #include <linux/config.h> | 29 | #include <linux/config.h> |
29 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
@@ -439,6 +440,7 @@ static int printk_time = 1; | |||
439 | #else | 440 | #else |
440 | static int printk_time = 0; | 441 | static int printk_time = 0; |
441 | #endif | 442 | #endif |
443 | module_param(printk_time, int, S_IRUGO | S_IWUSR); | ||
442 | 444 | ||
443 | static int __init printk_time_setup(char *str) | 445 | static int __init printk_time_setup(char *str) |
444 | { | 446 | { |