============================================= preset-lpj-04.12.10.patch: This patch adds support for a preset value for loops_per_jiffy. Signed-off-by: Geoff Levand for CELF --- Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ main.c | 4 ++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff -pruN -X ../cvs-admin/dontdiff tag_LINUX_2_6_9/init/Kconfig branch_PRESET_LPJ/init/Kconfig --- tag_LINUX_2_6_9/init/Kconfig 2004-10-22 14:42:45.000000000 -0700 +++ branch_PRESET_LPJ/init/Kconfig 2004-11-03 12:16:40.000000000 -0800 @@ -224,6 +224,45 @@ config IKCONFIG_PROC This option enables access to the kernel configuration file through /proc/config.gz. +menuconfig FASTBOOT + bool "Fast boot options" + help + Say Y here to select among various options that can decrease + kernel boot time. These options commonly involve providing + hardcoded values for some parameters that the kernel usually + determines automatically. + + This option is useful primarily on embedded systems. + + If unsure, say N. + +config PRESET_LPJ + int "Preset loops_per_jiffy" if FASTBOOT + default 0 + help + This is the number of loops used by delay() to achieve a single + jiffy of delay inside the kernel. It is normally calculated at + boot time, but that calculation can take up to 250 ms per CPU. + Specifying a constant value here will eliminate that delay. + + A value of 0 results in the normal autodetect behavior. + + To determine the correct value for your kernel, first set this + option to 0, compile and boot the kernel on your target hardware, + then see what value is printed during the kernel boot. Use that + value here. + + The kernel command line parameter "lpj=" can be used to override + the value configured here. + + Note that on SMP systems the preset will be applied to all CPUs + which will cause problems if for some reason your CPUs need + significantly divergent settings. + + If unsure, set this to 0. An incorrect value will cause delays in + the kernel to be wrong, leading to unpredictable I/O errors and + other breakage. Although unlikely, in the extreme case this might + damage your hardware. menuconfig EMBEDDED bool "Configure standard kernel features (for small systems)" diff -pruN -X ../cvs-admin/dontdiff tag_LINUX_2_6_9/init/main.c branch_PRESET_LPJ/init/main.c --- tag_LINUX_2_6_9/init/main.c 2004-10-22 14:42:45.000000000 -0700 +++ branch_PRESET_LPJ/init/main.c 2004-11-03 12:16:40.000000000 -0800 @@ -182,7 +182,7 @@ static int __init obsolete_checksetup(ch return 0; } -static unsigned long preset_lpj; +static unsigned long preset_lpj = CONFIG_PRESET_LPJ; static int __init lpj_setup(char *str) { preset_lpj = simple_strtoul(str,NULL,0); @@ -220,7 +220,7 @@ void __devinit calibrate_delay(void) } else { loops_per_jiffy = (1<<12); - printk(KERN_DEBUG "Calibrating delay loop... "); + printk("Calibrating delay loop... "); while ((loops_per_jiffy <<= 1) != 0) { /* wait for "start of" clock tick */ ticks = jiffies;