aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig46
-rw-r--r--init/do_mounts.c18
-rw-r--r--init/main.c34
3 files changed, 75 insertions, 23 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 9a7656f0b5ec..f7a04d0daf07 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -92,7 +92,7 @@ config LOCALVERSION_AUTO
92 92
93config SWAP 93config SWAP
94 bool "Support for paging of anonymous memory (swap)" 94 bool "Support for paging of anonymous memory (swap)"
95 depends on MMU 95 depends on MMU && BLOCK
96 default y 96 default y
97 help 97 help
98 This option allows you to choose whether you want to have support 98 This option allows you to choose whether you want to have support
@@ -202,7 +202,7 @@ config AUDITSYSCALL
202 ensure that INOTIFY is configured. 202 ensure that INOTIFY is configured.
203 203
204config IKCONFIG 204config IKCONFIG
205 bool "Kernel .config support" 205 tristate "Kernel .config support"
206 ---help--- 206 ---help---
207 This option enables the complete Linux kernel ".config" file 207 This option enables the complete Linux kernel ".config" file
208 contents to be saved in the kernel. It provides documentation 208 contents to be saved in the kernel. It provides documentation
@@ -257,6 +257,18 @@ config CC_OPTIMIZE_FOR_SIZE
257 257
258 If unsure, say N. 258 If unsure, say N.
259 259
260config TASK_XACCT
261 bool "Enable extended accounting over taskstats (EXPERIMENTAL)"
262 depends on TASKSTATS
263 help
264 Collect extended task accounting data and send the data
265 to userland for processing over the taskstats interface.
266
267 Say N if unsure.
268
269config SYSCTL
270 bool
271
260menuconfig EMBEDDED 272menuconfig EMBEDDED
261 bool "Configure standard kernel features (for small systems)" 273 bool "Configure standard kernel features (for small systems)"
262 help 274 help
@@ -272,22 +284,22 @@ config UID16
272 help 284 help
273 This enables the legacy 16-bit UID syscall wrappers. 285 This enables the legacy 16-bit UID syscall wrappers.
274 286
275config SYSCTL 287config SYSCTL_SYSCALL
276 bool "Sysctl support" if EMBEDDED 288 bool "Sysctl syscall support" if EMBEDDED
277 default y 289 default n
290 select SYSCTL
278 ---help--- 291 ---help---
279 The sysctl interface provides a means of dynamically changing 292 Enable the deprecated sysctl system call. sys_sysctl uses
280 certain kernel parameters and variables on the fly without requiring 293 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 294 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 295 everyone uses.
283 file system support", a tree of modifiable sysctl entries will be 296
284 generated beneath the /proc/sys directory. They are explained in the 297 Nothing has been using the binary sysctl interface for some
285 files in <file:Documentation/sysctl/>. Note that enabling this 298 time now so nothing should break if you disable sysctl syscall
286 option will enlarge the kernel by at least 8 KB. 299 support, and your kernel will get marginally smaller.
287 300
288 As it is generally a good thing, you should say Y here unless 301 Unless you have an application that uses the sys_sysctl interface
289 building a kernel for install/rescue disks or your system is very 302 you should probably say N here.
290 limited in memory.
291 303
292config KALLSYMS 304config KALLSYMS
293 bool "Load all symbols for debugging/kksymoops" if EMBEDDED 305 bool "Load all symbols for debugging/kksymoops" if EMBEDDED
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 94aeec7aa917..dc1ec0803ef9 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>
@@ -284,7 +285,11 @@ void __init mount_block_root(char *name, int flags)
284{ 285{
285 char *fs_names = __getname(); 286 char *fs_names = __getname();
286 char *p; 287 char *p;
288#ifdef CONFIG_BLOCK
287 char b[BDEVNAME_SIZE]; 289 char b[BDEVNAME_SIZE];
290#else
291 const char *b = name;
292#endif
288 293
289 get_fs_names(fs_names); 294 get_fs_names(fs_names);
290retry: 295retry:
@@ -303,7 +308,9 @@ retry:
303 * Allow the user to distinguish between failed sys_open 308 * Allow the user to distinguish between failed sys_open
304 * and bad superblock on root device. 309 * and bad superblock on root device.
305 */ 310 */
311#ifdef CONFIG_BLOCK
306 __bdevname(ROOT_DEV, b); 312 __bdevname(ROOT_DEV, b);
313#endif
307 printk("VFS: Cannot open root device \"%s\" or %s\n", 314 printk("VFS: Cannot open root device \"%s\" or %s\n",
308 root_device_name, b); 315 root_device_name, b);
309 printk("Please append a correct \"root=\" boot option\n"); 316 printk("Please append a correct \"root=\" boot option\n");
@@ -315,7 +322,10 @@ retry:
315 for (p = fs_names; *p; p += strlen(p)+1) 322 for (p = fs_names; *p; p += strlen(p)+1)
316 printk(" %s", p); 323 printk(" %s", p);
317 printk("\n"); 324 printk("\n");
318 panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b)); 325#ifdef CONFIG_BLOCK
326 __bdevname(ROOT_DEV, b);
327#endif
328 panic("VFS: Unable to mount root fs on %s", b);
319out: 329out:
320 putname(fs_names); 330 putname(fs_names);
321} 331}
@@ -386,8 +396,10 @@ void __init mount_root(void)
386 change_floppy("root floppy"); 396 change_floppy("root floppy");
387 } 397 }
388#endif 398#endif
399#ifdef CONFIG_BLOCK
389 create_dev("/dev/root", ROOT_DEV); 400 create_dev("/dev/root", ROOT_DEV);
390 mount_block_root("/dev/root", root_mountflags); 401 mount_block_root("/dev/root", root_mountflags);
402#endif
391} 403}
392 404
393/* 405/*
@@ -403,6 +415,10 @@ void __init prepare_namespace(void)
403 ssleep(root_delay); 415 ssleep(root_delay);
404 } 416 }
405 417
418 /* wait for the known devices to complete their probing */
419 while (driver_probe_done() != 0)
420 msleep(100);
421
406 md_run_setup(); 422 md_run_setup();
407 423
408 if (saved_root_name[0]) { 424 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();