aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig29
-rw-r--r--init/do_mounts.c24
-rw-r--r--init/do_mounts_initrd.c7
-rw-r--r--init/main.c59
4 files changed, 75 insertions, 44 deletions
diff --git a/init/Kconfig b/init/Kconfig
index d9d878a3bb46..e2056828dc64 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -120,15 +120,6 @@ config SYSVIPC
section 6.4 of the Linux Programmer's Guide, available from
<http://www.tldp.org/guides.html>.
-config IPC_NS
- bool "IPC Namespaces"
- depends on SYSVIPC
- default n
- help
- Support ipc namespaces. This allows containers, i.e. virtual
- environments, to use ipc namespaces to provide different ipc
- objects for different servers. If unsure, say N.
-
config SYSVIPC_SYSCTL
bool
depends on SYSVIPC
@@ -218,13 +209,14 @@ config TASK_IO_ACCOUNTING
Say N if unsure.
-config UTS_NS
- bool "UTS Namespaces"
+config USER_NS
+ bool "User Namespaces (EXPERIMENTAL)"
default n
+ depends on EXPERIMENTAL
help
- Support uts namespaces. This allows containers, i.e.
- vservers, to use uts namespaces to provide different
- uts info for different servers. If unsure, say N.
+ Support user namespaces. This allows containers, i.e.
+ vservers, to use user namespaces to provide different
+ user info for different servers. If unsure, say N.
config AUDIT
bool "Auditing support"
@@ -554,7 +546,7 @@ config SLUB_DEBUG
choice
prompt "Choose SLAB allocator"
- default SLAB
+ default SLUB
help
This option allows to select a slab allocator.
@@ -576,7 +568,7 @@ config SLUB
and has enhanced diagnostics.
config SLOB
- depends on EMBEDDED && !SPARSEMEM
+ depends on EMBEDDED
bool "SLOB (Simple Allocator)"
help
SLOB replaces the SLAB allocator with a drastically simpler
@@ -602,9 +594,7 @@ config BASE_SMALL
default 0 if BASE_FULL
default 1 if !BASE_FULL
-menu "Loadable module support"
-
-config MODULES
+menuconfig MODULES
bool "Enable loadable module support"
help
Kernel modules are small pieces of compiled code which can
@@ -684,6 +674,5 @@ config STOP_MACHINE
depends on (SMP && MODULE_UNLOAD) || HOTPLUG_CPU
help
Need stop_machine() primitive.
-endmenu
source "block/Kconfig"
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 46fe407fb03e..4efa1e5385e3 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -25,6 +25,7 @@ int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */
int root_mountflags = MS_RDONLY | MS_SILENT;
char * __initdata root_device_name;
static char __initdata saved_root_name[64];
+static int __initdata root_wait;
dev_t ROOT_DEV;
@@ -216,6 +217,16 @@ static int __init root_dev_setup(char *line)
__setup("root=", root_dev_setup);
+static int __init rootwait_setup(char *str)
+{
+ if (*str)
+ return 0;
+ root_wait = 1;
+ return 1;
+}
+
+__setup("rootwait", rootwait_setup);
+
static char * __initdata root_mount_data;
static int __init root_data_setup(char *str)
{
@@ -438,11 +449,20 @@ void __init prepare_namespace(void)
root_device_name += 5;
}
- is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
-
if (initrd_load())
goto out;
+ /* wait for any asynchronous scanning to complete */
+ if ((ROOT_DEV == 0) && root_wait) {
+ printk(KERN_INFO "Waiting for root device %s...\n",
+ saved_root_name);
+ while (driver_probe_done() != 0 ||
+ (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
+ msleep(100);
+ }
+
+ is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
+
if (is_floppy && rd_doload && rd_load_disk(0))
ROOT_DEV = Root_RAM0;
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index b222ce9e1c8b..a6b4c0c08e13 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -56,12 +56,9 @@ static void __init handle_initrd(void)
sys_chroot(".");
pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
- if (pid > 0) {
- while (pid != sys_wait4(-1, NULL, 0, NULL)) {
- try_to_freeze();
+ if (pid > 0)
+ while (pid != sys_wait4(-1, NULL, 0, NULL))
yield();
- }
- }
/* move initrd to rootfs' /old */
sys_fchdir(old_fd);
diff --git a/init/main.c b/init/main.c
index 0eb1c7463fe4..d3bcb3b11620 100644
--- a/init/main.c
+++ b/init/main.c
@@ -132,20 +132,9 @@ static char *static_command_line;
static char *execute_command;
static char *ramdisk_execute_command;
+#ifdef CONFIG_SMP
/* Setup configured maximum number of CPUs to activate */
-static unsigned int max_cpus = NR_CPUS;
-
-/*
- * If set, this is an indication to the drivers that reset the underlying
- * device before going ahead with the initialization otherwise driver might
- * rely on the BIOS and skip the reset operation.
- *
- * This is useful if kernel is booting in an unreliable environment.
- * For ex. kdump situaiton where previous kernel has crashed, BIOS has been
- * skipped and devices will be in unknown state.
- */
-unsigned int reset_devices;
-EXPORT_SYMBOL(reset_devices);
+static unsigned int __initdata max_cpus = NR_CPUS;
/*
* Setup routine for controlling SMP activation
@@ -160,10 +149,10 @@ EXPORT_SYMBOL(reset_devices);
static int __init nosmp(char *str)
{
max_cpus = 0;
- return 1;
+ return 0;
}
-__setup("nosmp", nosmp);
+early_param("nosmp", nosmp);
static int __init maxcpus(char *str)
{
@@ -172,6 +161,21 @@ static int __init maxcpus(char *str)
}
__setup("maxcpus=", maxcpus);
+#else
+#define max_cpus NR_CPUS
+#endif
+
+/*
+ * If set, this is an indication to the drivers that reset the underlying
+ * device before going ahead with the initialization otherwise driver might
+ * rely on the BIOS and skip the reset operation.
+ *
+ * This is useful if kernel is booting in an unreliable environment.
+ * For ex. kdump situaiton where previous kernel has crashed, BIOS has been
+ * skipped and devices will be in unknown state.
+ */
+unsigned int reset_devices;
+EXPORT_SYMBOL(reset_devices);
static int __init set_reset_devices(char *str)
{
@@ -385,6 +389,10 @@ static void __init smp_init(void)
{
unsigned int cpu;
+#ifndef CONFIG_HOTPLUG_CPU
+ cpu_possible_map = cpu_present_map;
+#endif
+
/* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) {
if (num_online_cpus() >= max_cpus)
@@ -453,7 +461,10 @@ static int __init do_early_param(char *param, char *val)
struct obs_kernel_param *p;
for (p = __setup_start; p < __setup_end; p++) {
- if (p->early && strcmp(param, p->str) == 0) {
+ if ((p->early && strcmp(param, p->str) == 0) ||
+ (strcmp(param, "console") == 0 &&
+ strcmp(p->str, "earlycon") == 0)
+ ) {
if (p->setup_func(val) != 0)
printk(KERN_WARNING
"Malformed early option '%s'\n", param);
@@ -526,6 +537,10 @@ asmlinkage void __init start_kernel(void)
setup_arch(&command_line);
setup_command_line(command_line);
unwind_setup();
+#ifndef CONFIG_HOTPLUG_CPU
+ if (max_cpus < 2)
+ cpu_possible_map = cpu_online_map;
+#endif
setup_per_cpu_areas();
smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
@@ -725,6 +740,15 @@ static void __init do_basic_setup(void)
do_initcalls();
}
+static int __initdata nosoftlockup;
+
+static int __init nosoftlockup_setup(char *str)
+{
+ nosoftlockup = 1;
+ return 1;
+}
+__setup("nosoftlockup", nosoftlockup_setup);
+
static void __init do_pre_smp_initcalls(void)
{
extern int spawn_ksoftirqd(void);
@@ -734,7 +758,8 @@ static void __init do_pre_smp_initcalls(void)
migration_init();
#endif
spawn_ksoftirqd();
- spawn_softlockup_task();
+ if (!nosoftlockup)
+ spawn_softlockup_task();
}
static void run_init_process(char *init_filename)