diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 28 | ||||
-rw-r--r-- | init/calibrate.c | 12 | ||||
-rw-r--r-- | init/do_mounts.c | 35 | ||||
-rw-r--r-- | init/main.c | 20 |
4 files changed, 83 insertions, 12 deletions
diff --git a/init/Kconfig b/init/Kconfig index 412c21b00d5..6aad581f18e 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -673,7 +673,7 @@ config CGROUP_MEM_RES_CTLR_SWAP | |||
673 | be careful about enabling this. When memory resource controller | 673 | be careful about enabling this. When memory resource controller |
674 | is disabled by boot option, this will be automatically disabled and | 674 | is disabled by boot option, this will be automatically disabled and |
675 | there will be no overhead from this. Even when you set this config=y, | 675 | there will be no overhead from this. Even when you set this config=y, |
676 | if boot option "noswapaccount" is set, swap will not be accounted. | 676 | if boot option "swapaccount=0" is set, swap will not be accounted. |
677 | Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page | 677 | Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page |
678 | size is 4096bytes, 512k per 1Gbytes of swap. | 678 | size is 4096bytes, 512k per 1Gbytes of swap. |
679 | config CGROUP_MEM_RES_CTLR_SWAP_ENABLED | 679 | config CGROUP_MEM_RES_CTLR_SWAP_ENABLED |
@@ -688,7 +688,7 @@ config CGROUP_MEM_RES_CTLR_SWAP_ENABLED | |||
688 | parameter should have this option unselected. | 688 | parameter should have this option unselected. |
689 | For those who want to have the feature enabled by default should | 689 | For those who want to have the feature enabled by default should |
690 | select this option (if, for some reason, they need to disable it | 690 | select this option (if, for some reason, they need to disable it |
691 | then noswapaccount does the trick). | 691 | then swapaccount=0 does the trick). |
692 | 692 | ||
693 | config CGROUP_PERF | 693 | config CGROUP_PERF |
694 | bool "Enable perf_event per-cpu per-container group (cgroup) monitoring" | 694 | bool "Enable perf_event per-cpu per-container group (cgroup) monitoring" |
@@ -915,8 +915,16 @@ config SYSCTL | |||
915 | config ANON_INODES | 915 | config ANON_INODES |
916 | bool | 916 | bool |
917 | 917 | ||
918 | config PANIC_TIMEOUT | ||
919 | int "Default panic timeout" | ||
920 | default 0 | ||
921 | help | ||
922 | Set default panic timeout. | ||
923 | |||
918 | menuconfig EXPERT | 924 | menuconfig EXPERT |
919 | bool "Configure standard kernel features (expert users)" | 925 | bool "Configure standard kernel features (expert users)" |
926 | # Unhide debug options, to make the on-by-default options visible | ||
927 | select DEBUG_KERNEL | ||
920 | help | 928 | help |
921 | This option allows certain base kernel options and settings | 929 | This option allows certain base kernel options and settings |
922 | to be disabled or tweaked. This is for specialized | 930 | to be disabled or tweaked. This is for specialized |
@@ -1007,14 +1015,19 @@ config ELF_CORE | |||
1007 | help | 1015 | help |
1008 | Enable support for generating core dumps. Disabling saves about 4k. | 1016 | Enable support for generating core dumps. Disabling saves about 4k. |
1009 | 1017 | ||
1018 | |||
1010 | config PCSPKR_PLATFORM | 1019 | config PCSPKR_PLATFORM |
1011 | bool "Enable PC-Speaker support" if EXPERT | 1020 | bool "Enable PC-Speaker support" if EXPERT |
1012 | depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES | 1021 | depends on HAVE_PCSPKR_PLATFORM |
1022 | select I8253_LOCK | ||
1013 | default y | 1023 | default y |
1014 | help | 1024 | help |
1015 | This option allows to disable the internal PC-Speaker | 1025 | This option allows to disable the internal PC-Speaker |
1016 | support, saving some memory. | 1026 | support, saving some memory. |
1017 | 1027 | ||
1028 | config HAVE_PCSPKR_PLATFORM | ||
1029 | bool | ||
1030 | |||
1018 | config BASE_FULL | 1031 | config BASE_FULL |
1019 | default y | 1032 | default y |
1020 | bool "Enable full-sized data structures for core" if EXPERT | 1033 | bool "Enable full-sized data structures for core" if EXPERT |
@@ -1081,6 +1094,15 @@ config SHMEM | |||
1081 | option replaces shmem and tmpfs with the much simpler ramfs code, | 1094 | option replaces shmem and tmpfs with the much simpler ramfs code, |
1082 | which may be appropriate on small systems without swap. | 1095 | which may be appropriate on small systems without swap. |
1083 | 1096 | ||
1097 | config ASHMEM | ||
1098 | bool "Enable the Anonymous Shared Memory Subsystem" | ||
1099 | default n | ||
1100 | depends on SHMEM || TINY_SHMEM | ||
1101 | help | ||
1102 | The ashmem subsystem is a new shared memory allocator, similar to | ||
1103 | POSIX SHM but with different behavior and sporting a simpler | ||
1104 | file-based API. | ||
1105 | |||
1084 | config AIO | 1106 | config AIO |
1085 | bool "Enable AIO support" if EXPERT | 1107 | bool "Enable AIO support" if EXPERT |
1086 | default y | 1108 | default y |
diff --git a/init/calibrate.c b/init/calibrate.c index aae2f40fea4..6816bf2fced 100644 --- a/init/calibrate.c +++ b/init/calibrate.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/timex.h> | 10 | #include <linux/timex.h> |
11 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
12 | #include <linux/percpu.h> | ||
12 | 13 | ||
13 | unsigned long lpj_fine; | 14 | unsigned long lpj_fine; |
14 | unsigned long preset_lpj; | 15 | unsigned long preset_lpj; |
@@ -243,12 +244,20 @@ recalibrate: | |||
243 | return lpj; | 244 | return lpj; |
244 | } | 245 | } |
245 | 246 | ||
247 | static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 }; | ||
248 | |||
246 | void __cpuinit calibrate_delay(void) | 249 | void __cpuinit calibrate_delay(void) |
247 | { | 250 | { |
248 | unsigned long lpj; | 251 | unsigned long lpj; |
249 | static bool printed; | 252 | static bool printed; |
253 | int this_cpu = smp_processor_id(); | ||
250 | 254 | ||
251 | if (preset_lpj) { | 255 | if (per_cpu(cpu_loops_per_jiffy, this_cpu)) { |
256 | lpj = per_cpu(cpu_loops_per_jiffy, this_cpu); | ||
257 | if (!printed) | ||
258 | pr_info("Calibrating delay loop (skipped) " | ||
259 | "already calibrated this CPU"); | ||
260 | } else if (preset_lpj) { | ||
252 | lpj = preset_lpj; | 261 | lpj = preset_lpj; |
253 | if (!printed) | 262 | if (!printed) |
254 | pr_info("Calibrating delay loop (skipped) " | 263 | pr_info("Calibrating delay loop (skipped) " |
@@ -266,6 +275,7 @@ void __cpuinit calibrate_delay(void) | |||
266 | pr_info("Calibrating delay loop... "); | 275 | pr_info("Calibrating delay loop... "); |
267 | lpj = calibrate_delay_converge(); | 276 | lpj = calibrate_delay_converge(); |
268 | } | 277 | } |
278 | per_cpu(cpu_loops_per_jiffy, this_cpu) = lpj; | ||
269 | if (!printed) | 279 | if (!printed) |
270 | pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", | 280 | pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", |
271 | lpj/(500000/HZ), | 281 | lpj/(500000/HZ), |
diff --git a/init/do_mounts.c b/init/do_mounts.c index c0851a8e030..ef6478fbb54 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -360,15 +360,42 @@ out: | |||
360 | } | 360 | } |
361 | 361 | ||
362 | #ifdef CONFIG_ROOT_NFS | 362 | #ifdef CONFIG_ROOT_NFS |
363 | |||
364 | #define NFSROOT_TIMEOUT_MIN 5 | ||
365 | #define NFSROOT_TIMEOUT_MAX 30 | ||
366 | #define NFSROOT_RETRY_MAX 5 | ||
367 | |||
363 | static int __init mount_nfs_root(void) | 368 | static int __init mount_nfs_root(void) |
364 | { | 369 | { |
365 | char *root_dev, *root_data; | 370 | char *root_dev, *root_data; |
371 | unsigned int timeout; | ||
372 | int try, err; | ||
366 | 373 | ||
367 | if (nfs_root_data(&root_dev, &root_data) != 0) | 374 | err = nfs_root_data(&root_dev, &root_data); |
368 | return 0; | 375 | if (err != 0) |
369 | if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0) | ||
370 | return 0; | 376 | return 0; |
371 | return 1; | 377 | |
378 | /* | ||
379 | * The server or network may not be ready, so try several | ||
380 | * times. Stop after a few tries in case the client wants | ||
381 | * to fall back to other boot methods. | ||
382 | */ | ||
383 | timeout = NFSROOT_TIMEOUT_MIN; | ||
384 | for (try = 1; ; try++) { | ||
385 | err = do_mount_root(root_dev, "nfs", | ||
386 | root_mountflags, root_data); | ||
387 | if (err == 0) | ||
388 | return 1; | ||
389 | if (try > NFSROOT_RETRY_MAX) | ||
390 | break; | ||
391 | |||
392 | /* Wait, in case the server refused us immediately */ | ||
393 | ssleep(timeout); | ||
394 | timeout <<= 1; | ||
395 | if (timeout > NFSROOT_TIMEOUT_MAX) | ||
396 | timeout = NFSROOT_TIMEOUT_MAX; | ||
397 | } | ||
398 | return 0; | ||
372 | } | 399 | } |
373 | #endif | 400 | #endif |
374 | 401 | ||
diff --git a/init/main.c b/init/main.c index d7211faed2a..03b408dff82 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -209,8 +209,19 @@ early_param("quiet", quiet_kernel); | |||
209 | 209 | ||
210 | static int __init loglevel(char *str) | 210 | static int __init loglevel(char *str) |
211 | { | 211 | { |
212 | get_option(&str, &console_loglevel); | 212 | int newlevel; |
213 | return 0; | 213 | |
214 | /* | ||
215 | * Only update loglevel value when a correct setting was passed, | ||
216 | * to prevent blind crashes (when loglevel being set to 0) that | ||
217 | * are quite hard to debug | ||
218 | */ | ||
219 | if (get_option(&str, &newlevel)) { | ||
220 | console_loglevel = newlevel; | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | return -EINVAL; | ||
214 | } | 225 | } |
215 | 226 | ||
216 | early_param("loglevel", loglevel); | 227 | early_param("loglevel", loglevel); |
@@ -369,9 +380,9 @@ static noinline void __init_refok rest_init(void) | |||
369 | init_idle_bootup_task(current); | 380 | init_idle_bootup_task(current); |
370 | preempt_enable_no_resched(); | 381 | preempt_enable_no_resched(); |
371 | schedule(); | 382 | schedule(); |
372 | preempt_disable(); | ||
373 | 383 | ||
374 | /* Call into cpu_idle with preempt disabled */ | 384 | /* Call into cpu_idle with preempt disabled */ |
385 | preempt_disable(); | ||
375 | cpu_idle(); | 386 | cpu_idle(); |
376 | } | 387 | } |
377 | 388 | ||
@@ -715,10 +726,11 @@ static void __init do_basic_setup(void) | |||
715 | { | 726 | { |
716 | cpuset_init_smp(); | 727 | cpuset_init_smp(); |
717 | usermodehelper_init(); | 728 | usermodehelper_init(); |
718 | init_tmpfs(); | 729 | shmem_init(); |
719 | driver_init(); | 730 | driver_init(); |
720 | init_irq_proc(); | 731 | init_irq_proc(); |
721 | do_ctors(); | 732 | do_ctors(); |
733 | usermodehelper_enable(); | ||
722 | do_initcalls(); | 734 | do_initcalls(); |
723 | } | 735 | } |
724 | 736 | ||