aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig31
-rw-r--r--init/do_mounts.c5
-rw-r--r--init/main.c34
3 files changed, 51 insertions, 19 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 9a7656f0b5ec..4381006dd666 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -273,21 +273,24 @@ config UID16
273 This enables the legacy 16-bit UID syscall wrappers. 273 This enables the legacy 16-bit UID syscall wrappers.
274 274
275config SYSCTL 275config SYSCTL
276 bool "Sysctl support" if EMBEDDED 276 bool
277 default y 277
278config SYSCTL_SYSCALL
279 bool "Sysctl syscall support"
280 default n
281 select SYSCTL
278 ---help--- 282 ---help---
279 The sysctl interface provides a means of dynamically changing 283 Enable the deprecated sysctl system call. sys_sysctl uses
280 certain kernel parameters and variables on the fly without requiring 284 binary paths that have been found to be a major pain to maintain
281 a recompile of the kernel or reboot of the system. The primary 285 and use. The interface in /proc/sys is now the primary and what
282 interface consists of a system call, but if you say Y to "/proc 286 everyone uses.
283 file system support", a tree of modifiable sysctl entries will be 287
284 generated beneath the /proc/sys directory. They are explained in the 288 Nothing has been using the binary sysctl interface for some time
285 files in <file:Documentation/sysctl/>. Note that enabling this 289 time now so nothing should break if you disable sysctl syscall
286 option will enlarge the kernel by at least 8 KB. 290 support, and you kernel will get marginally smaller.
287 291
288 As it is generally a good thing, you should say Y here unless 292 Unless you have an application that uses the sys_syscall interface
289 building a kernel for install/rescue disks or your system is very 293 you should probably say N here.
290 limited in memory.
291 294
292config KALLSYMS 295config KALLSYMS
293 bool "Load all symbols for debugging/kksymoops" if EMBEDDED 296 bool "Load all symbols for debugging/kksymoops" if EMBEDDED
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 94aeec7aa917..b290aadb1d3f 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -8,6 +8,7 @@
8#include <linux/security.h> 8#include <linux/security.h>
9#include <linux/delay.h> 9#include <linux/delay.h>
10#include <linux/mount.h> 10#include <linux/mount.h>
11#include <linux/device.h>
11 12
12#include <linux/nfs_fs.h> 13#include <linux/nfs_fs.h>
13#include <linux/nfs_fs_sb.h> 14#include <linux/nfs_fs_sb.h>
@@ -403,6 +404,10 @@ void __init prepare_namespace(void)
403 ssleep(root_delay); 404 ssleep(root_delay);
404 } 405 }
405 406
407 /* wait for the known devices to complete their probing */
408 while (driver_probe_done() != 0)
409 msleep(100);
410
406 md_run_setup(); 411 md_run_setup();
407 412
408 if (saved_root_name[0]) { 413 if (saved_root_name[0]) {
diff --git a/init/main.c b/init/main.c
index 8651a720a092..0766e69712b2 100644
--- a/init/main.c
+++ b/init/main.c
@@ -128,6 +128,18 @@ static char *ramdisk_execute_command;
128static unsigned int max_cpus = NR_CPUS; 128static unsigned int max_cpus = NR_CPUS;
129 129
130/* 130/*
131 * If set, this is an indication to the drivers that reset the underlying
132 * device before going ahead with the initialization otherwise driver might
133 * rely on the BIOS and skip the reset operation.
134 *
135 * This is useful if kernel is booting in an unreliable environment.
136 * For ex. kdump situaiton where previous kernel has crashed, BIOS has been
137 * skipped and devices will be in unknown state.
138 */
139unsigned int reset_devices;
140EXPORT_SYMBOL(reset_devices);
141
142/*
131 * Setup routine for controlling SMP activation 143 * Setup routine for controlling SMP activation
132 * 144 *
133 * Command-line option of "nosmp" or "maxcpus=0" will disable SMP 145 * Command-line option of "nosmp" or "maxcpus=0" will disable SMP
@@ -153,6 +165,14 @@ static int __init maxcpus(char *str)
153 165
154__setup("maxcpus=", maxcpus); 166__setup("maxcpus=", maxcpus);
155 167
168static int __init set_reset_devices(char *str)
169{
170 reset_devices = 1;
171 return 1;
172}
173
174__setup("reset_devices", set_reset_devices);
175
156static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; 176static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
157char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; 177char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
158static const char *panic_later, *panic_param; 178static const char *panic_later, *panic_param;
@@ -162,16 +182,19 @@ extern struct obs_kernel_param __setup_start[], __setup_end[];
162static int __init obsolete_checksetup(char *line) 182static int __init obsolete_checksetup(char *line)
163{ 183{
164 struct obs_kernel_param *p; 184 struct obs_kernel_param *p;
185 int had_early_param = 0;
165 186
166 p = __setup_start; 187 p = __setup_start;
167 do { 188 do {
168 int n = strlen(p->str); 189 int n = strlen(p->str);
169 if (!strncmp(line, p->str, n)) { 190 if (!strncmp(line, p->str, n)) {
170 if (p->early) { 191 if (p->early) {
171 /* Already done in parse_early_param? (Needs 192 /* Already done in parse_early_param?
172 * exact match on param part) */ 193 * (Needs exact match on param part).
194 * Keep iterating, as we can have early
195 * params and __setups of same names 8( */
173 if (line[n] == '\0' || line[n] == '=') 196 if (line[n] == '\0' || line[n] == '=')
174 return 1; 197 had_early_param = 1;
175 } else if (!p->setup_func) { 198 } else if (!p->setup_func) {
176 printk(KERN_WARNING "Parameter %s is obsolete," 199 printk(KERN_WARNING "Parameter %s is obsolete,"
177 " ignored\n", p->str); 200 " ignored\n", p->str);
@@ -181,7 +204,8 @@ static int __init obsolete_checksetup(char *line)
181 } 204 }
182 p++; 205 p++;
183 } while (p < __setup_end); 206 } while (p < __setup_end);
184 return 0; 207
208 return had_early_param;
185} 209}
186 210
187/* 211/*
@@ -464,6 +488,7 @@ asmlinkage void __init start_kernel(void)
464 * Need to run as early as possible, to initialize the 488 * Need to run as early as possible, to initialize the
465 * lockdep hash: 489 * lockdep hash:
466 */ 490 */
491 unwind_init();
467 lockdep_init(); 492 lockdep_init();
468 493
469 local_irq_disable(); 494 local_irq_disable();
@@ -502,7 +527,6 @@ asmlinkage void __init start_kernel(void)
502 __stop___param - __start___param, 527 __stop___param - __start___param,
503 &unknown_bootoption); 528 &unknown_bootoption);
504 sort_main_extable(); 529 sort_main_extable();
505 unwind_init();
506 trap_init(); 530 trap_init();
507 rcu_init(); 531 rcu_init();
508 init_IRQ(); 532 init_IRQ();