diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 55 | ||||
-rw-r--r-- | init/do_mounts.c | 17 | ||||
-rw-r--r-- | init/do_mounts_initrd.c | 3 | ||||
-rw-r--r-- | init/initramfs.c | 2 | ||||
-rw-r--r-- | init/main.c | 68 |
5 files changed, 66 insertions, 79 deletions
diff --git a/init/Kconfig b/init/Kconfig index a9e99f8328ff..d54d0cadcc06 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -7,7 +7,7 @@ config DEFCONFIG_LIST default "/boot/config-$UNAME_RELEASE" default "arch/$ARCH/defconfig" -menu "Code maturity level options" +menu "General setup" config EXPERIMENTAL bool "Prompt for development and/or incomplete code/drivers" @@ -61,9 +61,6 @@ config INIT_ENV_ARG_LIMIT Maximum of each of the number of arguments and environment variables passed to init from the kernel command line. -endmenu - -menu "General setup" config LOCALVERSION string "Local version - append to kernel release" @@ -120,15 +117,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 +206,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" @@ -348,7 +337,7 @@ endif config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size (Look out for broken compilers!)" default y - depends on ARM || H8300 || EXPERIMENTAL + depends on ARM || H8300 || SUPERH || EXPERIMENTAL help Enabling this option will pass "-Os" instead of "-O2" to gcc resulting in a smaller kernel. @@ -476,25 +465,19 @@ config FUTEX run glibc-based applications correctly. config ANON_INODES - bool "Enable anonymous inode source" if EMBEDDED - default y - help - Anonymous inode source for pseudo-files like epoll, signalfd, - timerfd and eventfd. - - If unsure, say Y. + bool config EPOLL bool "Enable eventpoll support" if EMBEDDED default y - depends on ANON_INODES + select ANON_INODES help Disabling this option will cause the kernel to be built without support for epoll family of system calls. config SIGNALFD bool "Enable signalfd() system call" if EMBEDDED - depends on ANON_INODES + select ANON_INODES default y help Enable the signalfd() system call that allows to receive signals @@ -504,7 +487,8 @@ config SIGNALFD config TIMERFD bool "Enable timerfd() system call" if EMBEDDED - depends on ANON_INODES + select ANON_INODES + depends on BROKEN default y help Enable the timerfd() system call that allows to receive timer @@ -514,7 +498,7 @@ config TIMERFD config EVENTFD bool "Enable eventfd() system call" if EMBEDDED - depends on ANON_INODES + select ANON_INODES default y help Enable the eventfd() system call that allows to receive both @@ -554,7 +538,7 @@ config SLUB_DEBUG choice prompt "Choose SLAB allocator" - default SLAB + default SLUB help This option allows to select a slab allocator. @@ -576,7 +560,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 +586,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,8 +666,5 @@ config STOP_MACHINE depends on (SMP && MODULE_UNLOAD) || HOTPLUG_CPU help Need stop_machine() primitive. -endmenu -menu "Block layer" source "block/Kconfig" -endmenu diff --git a/init/do_mounts.c b/init/do_mounts.c index cf317e04bbcf..4efa1e5385e3 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -360,16 +360,6 @@ static int __init mount_nfs_root(void) } #endif -#ifdef CONFIG_ROOT_CRAMFS_LINEAR -static int __init mount_cramfs_linear_root(void) -{ - create_dev("/dev/root", ROOT_DEV); - if (do_mount_root("/dev/root","cramfs",root_mountflags,root_mount_data) == 0) - return 1; - return 0; -} -#endif - #if defined(CONFIG_BLK_DEV_RAM) || defined(CONFIG_BLK_DEV_FD) void __init change_floppy(char *fmt, ...) { @@ -402,13 +392,6 @@ void __init change_floppy(char *fmt, ...) void __init mount_root(void) { -#ifdef CONFIG_ROOT_CRAMFS_LINEAR - if (ROOT_DEV == MKDEV(0, 0)) { - if (mount_cramfs_linear_root()) - return; - printk (KERN_ERR "VFS: Unable to mount linear cramfs root.\n"); - } -#endif #ifdef CONFIG_ROOT_NFS if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) { if (mount_nfs_root()) diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index b222ce9e1c8b..fd4fc12d2624 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -56,12 +56,11 @@ static void __init handle_initrd(void) sys_chroot("."); pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); - if (pid > 0) { + if (pid > 0) while (pid != sys_wait4(-1, NULL, 0, NULL)) { try_to_freeze(); yield(); } - } /* move initrd to rootfs' /old */ sys_fchdir(old_fd); diff --git a/init/initramfs.c b/init/initramfs.c index 00eff7a11085..1db02a0025db 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -133,7 +133,7 @@ static __initdata loff_t this_header, next_header; static __initdata int dry_run; -static inline void eat(unsigned n) +static inline void __init eat(unsigned n) { victim += n; this_header += n; diff --git a/init/main.c b/init/main.c index eb8bdbae4fc7..9def935ab13a 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 @@ -157,21 +146,44 @@ EXPORT_SYMBOL(reset_devices); * greater than 0, limits the maximum number of CPUs activated in * SMP mode to <NUM>. */ +#ifndef CONFIG_X86_IO_APIC +static inline void disable_ioapic_setup(void) {}; +#endif + static int __init nosmp(char *str) { max_cpus = 0; - return 1; + disable_ioapic_setup(); + return 0; } -__setup("nosmp", nosmp); +early_param("nosmp", nosmp); static int __init maxcpus(char *str) { get_option(&str, &max_cpus); - return 1; + if (max_cpus == 0) + disable_ioapic_setup(); + + return 0; } -__setup("maxcpus=", maxcpus); +early_param("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) { @@ -436,15 +448,16 @@ static void noinline __init_refok rest_init(void) /* * The boot idle thread must execute schedule() - * at least one to get things moving: + * at least once to get things moving: */ + init_idle_bootup_task(current); preempt_enable_no_resched(); schedule(); preempt_disable(); /* Call into cpu_idle with preempt disabled */ cpu_idle(); -} +} /* Check for early params. */ static int __init do_early_param(char *param, char *val) @@ -452,7 +465,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); @@ -724,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); @@ -733,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) |