Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

add printk.time option, deprecate 'time'

Allow printk_time to be enabled or disabled at boot time. Previously it
could be enabled only, but not disabled.

Change printk_time from an int to a bool since that's what it is. Make its
logical (exposed) name just be "time" (was "printk_time").

Note: Changes kernel boot option syntax from "time" to "printk.time=value".

Since printk_time is declared as a module_param, it can also be
changed at run-time by modifying
/sys/module/printk/parameters/time
to a value of 1/Y/y to enabled it or 0/N/n to disable it.

Since printk_time is declared as a module_param, its value can also
be set at boot-time by using
linux printk.time=<bool>

If the "time" boot option is used, print a message that it is deprecated
and will be removed.

Note its planned removal in feature-removal-schedule.txt.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Randy Dunlap and committed by
Linus Torvalds
e84845c4 18584870

+16 -1
+8
Documentation/feature-removal-schedule.txt
··· 257 257 258 258 --------------------------- 259 259 260 + What: 'time' kernel boot parameter 261 + When: January 2008 262 + Why: replaced by 'printk.time=<value>' so that printk timestamps can be 263 + enabled or disabled as needed 264 + Who: Randy Dunlap <randy.dunlap@oracle.com> 265 + 266 + --------------------------- 267 + 260 268 What: drivers depending on OSS_OBSOLETE 261 269 When: options in 2.6.23, code in 2.6.25 262 270 Why: obsolete OSS drivers
+4
Documentation/kernel-parameters.txt
··· 1389 1389 the kernel console. 1390 1390 default: off. 1391 1391 1392 + printk.time= Show timing data prefixed to each printk message line 1393 + Format: <bool> (1/Y/y=enable, 0/N/n=disable) 1394 + 1392 1395 profile= [KNL] Enable kernel profiling via /proc/profile 1393 1396 Format: [schedule,]<number> 1394 1397 Param: "schedule" - profile schedule points. ··· 1827 1824 Set number of hash buckets for TCP connection 1828 1825 1829 1826 time Show timing data prefixed to each printk message line 1827 + [deprecated, see 'printk.time'] 1830 1828 1831 1829 tipar.timeout= [HW,PPT] 1832 1830 Set communications timeout in tenths of a second
+4 -1
kernel/printk.c
··· 449 449 #else 450 450 static int printk_time = 0; 451 451 #endif 452 - module_param(printk_time, int, S_IRUGO | S_IWUSR); 452 + module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); 453 453 454 454 static int __init printk_time_setup(char *str) 455 455 { 456 456 if (*str) 457 457 return 0; 458 458 printk_time = 1; 459 + printk(KERN_NOTICE "The 'time' option is deprecated and " 460 + "is scheduled for removal in early 2008\n"); 461 + printk(KERN_NOTICE "Use 'printk.time=<value>' instead\n"); 459 462 return 1; 460 463 } 461 464