diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 68 | ||||
-rw-r--r-- | init/do_mounts_md.c | 22 | ||||
-rw-r--r-- | init/do_mounts_rd.c | 4 | ||||
-rw-r--r-- | init/main.c | 9 |
4 files changed, 41 insertions, 62 deletions
diff --git a/init/Kconfig b/init/Kconfig index ea097e0a9c02..ba42f3793a84 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -105,7 +105,6 @@ config SWAP config SYSVIPC bool "System V IPC" - depends on MMU ---help--- Inter Process Communication is a suite of library functions and system calls which let processes (running programs) synchronize and @@ -190,40 +189,13 @@ config AUDIT config AUDITSYSCALL bool "Enable system-call auditing support" - depends on AUDIT && (X86 || PPC || PPC64 || ARCH_S390 || IA64 || UML || SPARC64) + depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64) default y if SECURITY_SELINUX help Enable low-overhead system-call auditing infrastructure that can be used independently or with another kernel subsystem, such as SELinux. -config HOTPLUG - bool "Support for hot-pluggable devices" if !ARCH_S390 - default ARCH_S390 - help - This option is provided for the case where no in-kernel-tree - modules require HOTPLUG functionality, but a module built - outside the kernel tree does. Such modules require Y here. - -config KOBJECT_UEVENT - bool "Kernel Userspace Events" - depends on NET - default y - help - This option enables the kernel userspace event layer, which is a - simple mechanism for kernel-to-user communication over a netlink - socket. - The goal of the kernel userspace events layer is to provide a simple - and efficient events system, that notifies userspace about kobject - state changes. This will enable applications to just listen for - events instead of polling system devices and files. - Hotplug events (kobject addition and removal) are also available on - the netlink socket in addition to the execution of /sbin/hotplug if - CONFIG_HOTPLUG is enabled. - - Say Y, unless you are building a system requiring minimal memory - consumption. - config IKCONFIG bool "Kernel .config support" ---help--- @@ -256,6 +228,19 @@ config CPUSETS source "usr/Kconfig" +config CC_OPTIMIZE_FOR_SIZE + bool "Optimize for size (Look out for broken compilers!)" + default y + depends on ARM || H8300 || EXPERIMENTAL + help + Enabling this option will pass "-Os" instead of "-O2" to gcc + resulting in a smaller kernel. + + WARNING: some versions of gcc may generate incorrect code with this + option. If problems are observed, a gcc upgrade may be needed. + + If unsure, say N. + menuconfig EMBEDDED bool "Configure standard kernel features (for small systems)" help @@ -295,6 +280,15 @@ config KALLSYMS_EXTRA_PASS you wait for kallsyms to be fixed. +config HOTPLUG + bool "Support for hot-pluggable devices" if EMBEDDED + default y + help + This option is provided for the case where no hotplug or uevent + capabilities is wanted by the kernel. You should only consider + disabling this option for embedded systems that do not use modules, a + dynamic /dev tree, or dynamic device discovery. Just say Y. + config PRINTK default y bool "Enable support for printk" if EMBEDDED @@ -338,18 +332,6 @@ config EPOLL Disabling this option will cause the kernel to be built without support for epoll family of system calls. -config CC_OPTIMIZE_FOR_SIZE - bool "Optimize for size" if EMBEDDED - default y if ARM || H8300 - help - Enabling this option will pass "-Os" instead of "-O2" to gcc - resulting in a smaller kernel. - - WARNING: some versions of gcc may generate incorrect code with this - option. If problems are observed, a gcc upgrade may be needed. - - If unsure, say N. - config SHMEM bool "Use full shmem filesystem" if EMBEDDED default y @@ -460,8 +442,8 @@ config OBSOLETE_MODPARM If unsure, say Y. config MODVERSIONS - bool "Module versioning support (EXPERIMENTAL)" - depends on MODULES && EXPERIMENTAL + bool "Module versioning support" + depends on MODULES help Usually, you have to use modules compiled with your kernel. Saying Y here makes it sometimes possible to use modules diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index 3fbc3555ce96..f6f36806f84a 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c @@ -17,7 +17,7 @@ static int __initdata raid_noautodetect, raid_autopart; static struct { int minor; int partitioned; - int pers; + int level; int chunk; char *device_names; } md_setup_args[MAX_MD_DEVS] __initdata; @@ -47,7 +47,7 @@ extern int mdp_major; */ static int __init md_setup(char *str) { - int minor, level, factor, fault, pers, partitioned = 0; + int minor, level, factor, fault, partitioned = 0; char *pername = ""; char *str1; int ent; @@ -78,7 +78,7 @@ static int __init md_setup(char *str) } if (ent >= md_setup_ents) md_setup_ents++; - switch (get_option(&str, &level)) { /* RAID Personality */ + switch (get_option(&str, &level)) { /* RAID level */ case 2: /* could be 0 or -1.. */ if (level == 0 || level == LEVEL_LINEAR) { if (get_option(&str, &factor) != 2 || /* Chunk Size */ @@ -86,16 +86,12 @@ static int __init md_setup(char *str) printk(KERN_WARNING "md: Too few arguments supplied to md=.\n"); return 0; } - md_setup_args[ent].pers = level; + md_setup_args[ent].level = level; md_setup_args[ent].chunk = 1 << (factor+12); - if (level == LEVEL_LINEAR) { - pers = LINEAR; + if (level == LEVEL_LINEAR) pername = "linear"; - } else { - pers = RAID0; + else pername = "raid0"; - } - md_setup_args[ent].pers = pers; break; } /* FALL THROUGH */ @@ -103,7 +99,7 @@ static int __init md_setup(char *str) str = str1; /* FALL THROUGH */ case 0: - md_setup_args[ent].pers = 0; + md_setup_args[ent].level = LEVEL_NONE; pername="super-block"; } @@ -190,10 +186,10 @@ static void __init md_setup_drive(void) continue; } - if (md_setup_args[ent].pers) { + if (md_setup_args[ent].level != LEVEL_NONE) { /* non-persistent */ mdu_array_info_t ainfo; - ainfo.level = pers_to_level(md_setup_args[ent].pers); + ainfo.level = md_setup_args[ent].level; ainfo.size = 0; ainfo.nr_disks =0; ainfo.raid_disks =0; diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index c10b08a80982..c2683fcd792d 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -145,7 +145,7 @@ int __init rd_load_image(char *from) int nblocks, i, disk; char *buf = NULL; unsigned short rotate = 0; -#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) +#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) char rotator[4] = { '|' , '/' , '-' , '\\' }; #endif @@ -237,7 +237,7 @@ int __init rd_load_image(char *from) } sys_read(in_fd, buf, BLOCK_SIZE); sys_write(out_fd, buf, BLOCK_SIZE); -#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) +#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) if (!(i % 16)) { printk("%c\b", rotator[rotate & 0x3]); rotate++; diff --git a/init/main.c b/init/main.c index 27f97f9b4636..2ed3638deec7 100644 --- a/init/main.c +++ b/init/main.c @@ -47,12 +47,12 @@ #include <linux/rmap.h> #include <linux/mempolicy.h> #include <linux/key.h> -#include <net/sock.h> #include <asm/io.h> #include <asm/bugs.h> #include <asm/setup.h> #include <asm/sections.h> +#include <asm/cacheflush.h> /* * This is one of the first .c files built. Error out early @@ -100,6 +100,9 @@ extern void acpi_early_init(void); #else static inline void acpi_early_init(void) { } #endif +#ifndef CONFIG_DEBUG_RODATA +static inline void mark_rodata_ro(void) { } +#endif #ifdef CONFIG_TC extern void tc_init(void); @@ -614,9 +617,6 @@ static void __init do_basic_setup(void) sysctl_init(); #endif - /* Networking initialization needs a process context */ - sock_init(); - do_initcalls(); } @@ -712,6 +712,7 @@ static int init(void * unused) */ free_initmem(); unlock_kernel(); + mark_rodata_ro(); system_state = SYSTEM_RUNNING; numa_default_policy(); |