path: root/init
diff options
authorRandy Dunlap <>2007-10-16 01:23:46 -0700
committerLinus Torvalds <>2007-10-16 09:42:49 -0700
commitbfe8df3d314bddf30758bd738e0087e80964760c (patch)
treed04db4fb2592e2d416073681903f05f5b30f204b /init
parent1bcf548293aef19b0797348332cf1dfbf2116cef (diff)
slow down printk during boot
Optionally add a boot delay after each kernel printk() call, crudely measured in milliseconds, with a maximum delay of 10 seconds per printk. Enable CONFIG_BOOT_PRINTK_DELAY=y and then add (e.g.): "lpj=loops_per_jiffy boot_delay=100" to the kernel command line. It has been useful in cases like "during boot, my machine just reboots or the screen goes black" by slowing down printk, (and adding initcall_debug), we can usually see the last thing that happened before the lights went out which is usually a valuable clue. [ not all architectures implement CONFIG_HZ] [ fix lots of stuff] [ kernel/printk.c: make 2 variables static] [ fix slow down printk on boot compile error] Signed-off-by: Randy Dunlap <> Signed-off-by: Dave Jones <> Signed-off-by: Adrian Bunk <> Signed-off-by: Heiko Carstens <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'init')
1 files changed, 1 insertions, 1 deletions
diff --git a/init/calibrate.c b/init/calibrate.c
index 40ff3b404895..2d3d73bd4ce1 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -10,7 +10,7 @@
#include <asm/timex.h>
-static unsigned long preset_lpj;
+unsigned long preset_lpj;
static int __init lpj_setup(char *str)
preset_lpj = simple_strtoul(str,NULL,0);