aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig109
-rw-r--r--init/do_mounts_md.c22
-rw-r--r--init/do_mounts_rd.c4
-rw-r--r--init/main.c34
4 files changed, 91 insertions, 78 deletions
diff --git a/init/Kconfig b/init/Kconfig
index ea097e0a9c..b9923b1434 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -99,13 +99,12 @@ config SWAP
99 default y 99 default y
100 help 100 help
101 This option allows you to choose whether you want to have support 101 This option allows you to choose whether you want to have support
102 for socalled swap devices or swap files in your kernel that are 102 for so called swap devices or swap files in your kernel that are
103 used to provide more virtual memory than the actual RAM present 103 used to provide more virtual memory than the actual RAM present
104 in your computer. If unsure say Y. 104 in your computer. If unsure say Y.
105 105
106config SYSVIPC 106config SYSVIPC
107 bool "System V IPC" 107 bool "System V IPC"
108 depends on MMU
109 ---help--- 108 ---help---
110 Inter Process Communication is a suite of library functions and 109 Inter Process Communication is a suite of library functions and
111 system calls which let processes (running programs) synchronize and 110 system calls which let processes (running programs) synchronize and
@@ -190,40 +189,13 @@ config AUDIT
190 189
191config AUDITSYSCALL 190config AUDITSYSCALL
192 bool "Enable system-call auditing support" 191 bool "Enable system-call auditing support"
193 depends on AUDIT && (X86 || PPC || PPC64 || ARCH_S390 || IA64 || UML || SPARC64) 192 depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64)
194 default y if SECURITY_SELINUX 193 default y if SECURITY_SELINUX
195 help 194 help
196 Enable low-overhead system-call auditing infrastructure that 195 Enable low-overhead system-call auditing infrastructure that
197 can be used independently or with another kernel subsystem, 196 can be used independently or with another kernel subsystem,
198 such as SELinux. 197 such as SELinux.
199 198
200config HOTPLUG
201 bool "Support for hot-pluggable devices" if !ARCH_S390
202 default ARCH_S390
203 help
204 This option is provided for the case where no in-kernel-tree
205 modules require HOTPLUG functionality, but a module built
206 outside the kernel tree does. Such modules require Y here.
207
208config KOBJECT_UEVENT
209 bool "Kernel Userspace Events"
210 depends on NET
211 default y
212 help
213 This option enables the kernel userspace event layer, which is a
214 simple mechanism for kernel-to-user communication over a netlink
215 socket.
216 The goal of the kernel userspace events layer is to provide a simple
217 and efficient events system, that notifies userspace about kobject
218 state changes. This will enable applications to just listen for
219 events instead of polling system devices and files.
220 Hotplug events (kobject addition and removal) are also available on
221 the netlink socket in addition to the execution of /sbin/hotplug if
222 CONFIG_HOTPLUG is enabled.
223
224 Say Y, unless you are building a system requiring minimal memory
225 consumption.
226
227config IKCONFIG 199config IKCONFIG
228 bool "Kernel .config support" 200 bool "Kernel .config support"
229 ---help--- 201 ---help---
@@ -256,6 +228,36 @@ config CPUSETS
256 228
257source "usr/Kconfig" 229source "usr/Kconfig"
258 230
231config UID16
232 bool "Enable 16-bit UID system calls" if EMBEDDED
233 depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION)
234 default y
235 help
236 This enables the legacy 16-bit UID syscall wrappers.
237
238config VM86
239 depends X86
240 default y
241 bool "Enable VM86 support" if EMBEDDED
242 help
243 This option is required by programs like DOSEMU to run 16-bit legacy
244 code on X86 processors. It also may be needed by software like
245 XFree86 to initialize some video cards via BIOS. Disabling this
246 option saves about 6k.
247
248config CC_OPTIMIZE_FOR_SIZE
249 bool "Optimize for size (Look out for broken compilers!)"
250 default y
251 depends on ARM || H8300 || EXPERIMENTAL
252 help
253 Enabling this option will pass "-Os" instead of "-O2" to gcc
254 resulting in a smaller kernel.
255
256 WARNING: some versions of gcc may generate incorrect code with this
257 option. If problems are observed, a gcc upgrade may be needed.
258
259 If unsure, say N.
260
259menuconfig EMBEDDED 261menuconfig EMBEDDED
260 bool "Configure standard kernel features (for small systems)" 262 bool "Configure standard kernel features (for small systems)"
261 help 263 help
@@ -295,6 +297,15 @@ config KALLSYMS_EXTRA_PASS
295 you wait for kallsyms to be fixed. 297 you wait for kallsyms to be fixed.
296 298
297 299
300config HOTPLUG
301 bool "Support for hot-pluggable devices" if EMBEDDED
302 default y
303 help
304 This option is provided for the case where no hotplug or uevent
305 capabilities is wanted by the kernel. You should only consider
306 disabling this option for embedded systems that do not use modules, a
307 dynamic /dev tree, or dynamic device discovery. Just say Y.
308
298config PRINTK 309config PRINTK
299 default y 310 default y
300 bool "Enable support for printk" if EMBEDDED 311 bool "Enable support for printk" if EMBEDDED
@@ -315,6 +326,12 @@ config BUG
315 option for embedded systems with no facilities for reporting errors. 326 option for embedded systems with no facilities for reporting errors.
316 Just say Y. 327 Just say Y.
317 328
329config ELF_CORE
330 default y
331 bool "Enable ELF core dumps" if EMBEDDED
332 help
333 Enable support for generating core dumps. Disabling saves about 4k.
334
318config BASE_FULL 335config BASE_FULL
319 default y 336 default y
320 bool "Enable full-sized data structures for core" if EMBEDDED 337 bool "Enable full-sized data structures for core" if EMBEDDED
@@ -338,18 +355,6 @@ config EPOLL
338 Disabling this option will cause the kernel to be built without 355 Disabling this option will cause the kernel to be built without
339 support for epoll family of system calls. 356 support for epoll family of system calls.
340 357
341config CC_OPTIMIZE_FOR_SIZE
342 bool "Optimize for size" if EMBEDDED
343 default y if ARM || H8300
344 help
345 Enabling this option will pass "-Os" instead of "-O2" to gcc
346 resulting in a smaller kernel.
347
348 WARNING: some versions of gcc may generate incorrect code with this
349 option. If problems are observed, a gcc upgrade may be needed.
350
351 If unsure, say N.
352
353config SHMEM 358config SHMEM
354 bool "Use full shmem filesystem" if EMBEDDED 359 bool "Use full shmem filesystem" if EMBEDDED
355 default y 360 default y
@@ -398,6 +403,15 @@ config CC_ALIGN_JUMPS
398 no dummy operations need be executed. 403 no dummy operations need be executed.
399 Zero means use compiler's default. 404 Zero means use compiler's default.
400 405
406config SLAB
407 default y
408 bool "Use full SLAB allocator" if EMBEDDED
409 help
410 Disabling this replaces the advanced SLAB allocator and
411 kmalloc support with the drastically simpler SLOB allocator.
412 SLOB is more space efficient but does not scale well and is
413 more susceptible to fragmentation.
414
401endmenu # General setup 415endmenu # General setup
402 416
403config TINY_SHMEM 417config TINY_SHMEM
@@ -409,6 +423,13 @@ config BASE_SMALL
409 default 0 if BASE_FULL 423 default 0 if BASE_FULL
410 default 1 if !BASE_FULL 424 default 1 if !BASE_FULL
411 425
426config SLOB
427 default !SLAB
428 bool
429
430config OBSOLETE_INTERMODULE
431 tristate
432
412menu "Loadable module support" 433menu "Loadable module support"
413 434
414config MODULES 435config MODULES
@@ -460,8 +481,8 @@ config OBSOLETE_MODPARM
460 If unsure, say Y. 481 If unsure, say Y.
461 482
462config MODVERSIONS 483config MODVERSIONS
463 bool "Module versioning support (EXPERIMENTAL)" 484 bool "Module versioning support"
464 depends on MODULES && EXPERIMENTAL 485 depends on MODULES
465 help 486 help
466 Usually, you have to use modules compiled with your kernel. 487 Usually, you have to use modules compiled with your kernel.
467 Saying Y here makes it sometimes possible to use modules 488 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 3fbc3555ce..f6f36806f8 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -17,7 +17,7 @@ static int __initdata raid_noautodetect, raid_autopart;
17static struct { 17static struct {
18 int minor; 18 int minor;
19 int partitioned; 19 int partitioned;
20 int pers; 20 int level;
21 int chunk; 21 int chunk;
22 char *device_names; 22 char *device_names;
23} md_setup_args[MAX_MD_DEVS] __initdata; 23} md_setup_args[MAX_MD_DEVS] __initdata;
@@ -47,7 +47,7 @@ extern int mdp_major;
47 */ 47 */
48static int __init md_setup(char *str) 48static int __init md_setup(char *str)
49{ 49{
50 int minor, level, factor, fault, pers, partitioned = 0; 50 int minor, level, factor, fault, partitioned = 0;
51 char *pername = ""; 51 char *pername = "";
52 char *str1; 52 char *str1;
53 int ent; 53 int ent;
@@ -78,7 +78,7 @@ static int __init md_setup(char *str)
78 } 78 }
79 if (ent >= md_setup_ents) 79 if (ent >= md_setup_ents)
80 md_setup_ents++; 80 md_setup_ents++;
81 switch (get_option(&str, &level)) { /* RAID Personality */ 81 switch (get_option(&str, &level)) { /* RAID level */
82 case 2: /* could be 0 or -1.. */ 82 case 2: /* could be 0 or -1.. */
83 if (level == 0 || level == LEVEL_LINEAR) { 83 if (level == 0 || level == LEVEL_LINEAR) {
84 if (get_option(&str, &factor) != 2 || /* Chunk Size */ 84 if (get_option(&str, &factor) != 2 || /* Chunk Size */
@@ -86,16 +86,12 @@ static int __init md_setup(char *str)
86 printk(KERN_WARNING "md: Too few arguments supplied to md=.\n"); 86 printk(KERN_WARNING "md: Too few arguments supplied to md=.\n");
87 return 0; 87 return 0;
88 } 88 }
89 md_setup_args[ent].pers = level; 89 md_setup_args[ent].level = level;
90 md_setup_args[ent].chunk = 1 << (factor+12); 90 md_setup_args[ent].chunk = 1 << (factor+12);
91 if (level == LEVEL_LINEAR) { 91 if (level == LEVEL_LINEAR)
92 pers = LINEAR;
93 pername = "linear"; 92 pername = "linear";
94 } else { 93 else
95 pers = RAID0;
96 pername = "raid0"; 94 pername = "raid0";
97 }
98 md_setup_args[ent].pers = pers;
99 break; 95 break;
100 } 96 }
101 /* FALL THROUGH */ 97 /* FALL THROUGH */
@@ -103,7 +99,7 @@ static int __init md_setup(char *str)
103 str = str1; 99 str = str1;
104 /* FALL THROUGH */ 100 /* FALL THROUGH */
105 case 0: 101 case 0:
106 md_setup_args[ent].pers = 0; 102 md_setup_args[ent].level = LEVEL_NONE;
107 pername="super-block"; 103 pername="super-block";
108 } 104 }
109 105
@@ -190,10 +186,10 @@ static void __init md_setup_drive(void)
190 continue; 186 continue;
191 } 187 }
192 188
193 if (md_setup_args[ent].pers) { 189 if (md_setup_args[ent].level != LEVEL_NONE) {
194 /* non-persistent */ 190 /* non-persistent */
195 mdu_array_info_t ainfo; 191 mdu_array_info_t ainfo;
196 ainfo.level = pers_to_level(md_setup_args[ent].pers); 192 ainfo.level = md_setup_args[ent].level;
197 ainfo.size = 0; 193 ainfo.size = 0;
198 ainfo.nr_disks =0; 194 ainfo.nr_disks =0;
199 ainfo.raid_disks =0; 195 ainfo.raid_disks =0;
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index c10b08a809..c2683fcd79 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -145,7 +145,7 @@ int __init rd_load_image(char *from)
145 int nblocks, i, disk; 145 int nblocks, i, disk;
146 char *buf = NULL; 146 char *buf = NULL;
147 unsigned short rotate = 0; 147 unsigned short rotate = 0;
148#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) 148#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES)
149 char rotator[4] = { '|' , '/' , '-' , '\\' }; 149 char rotator[4] = { '|' , '/' , '-' , '\\' };
150#endif 150#endif
151 151
@@ -237,7 +237,7 @@ int __init rd_load_image(char *from)
237 } 237 }
238 sys_read(in_fd, buf, BLOCK_SIZE); 238 sys_read(in_fd, buf, BLOCK_SIZE);
239 sys_write(out_fd, buf, BLOCK_SIZE); 239 sys_write(out_fd, buf, BLOCK_SIZE);
240#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) 240#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES)
241 if (!(i % 16)) { 241 if (!(i % 16)) {
242 printk("%c\b", rotator[rotate & 0x3]); 242 printk("%c\b", rotator[rotate & 0x3]);
243 rotate++; 243 rotate++;
diff --git a/init/main.c b/init/main.c
index 27f97f9b46..7c79da57d3 100644
--- a/init/main.c
+++ b/init/main.c
@@ -47,34 +47,27 @@
47#include <linux/rmap.h> 47#include <linux/rmap.h>
48#include <linux/mempolicy.h> 48#include <linux/mempolicy.h>
49#include <linux/key.h> 49#include <linux/key.h>
50#include <net/sock.h>
51 50
52#include <asm/io.h> 51#include <asm/io.h>
53#include <asm/bugs.h> 52#include <asm/bugs.h>
54#include <asm/setup.h> 53#include <asm/setup.h>
55#include <asm/sections.h> 54#include <asm/sections.h>
56 55#include <asm/cacheflush.h>
57/*
58 * This is one of the first .c files built. Error out early
59 * if we have compiler trouble..
60 */
61#if __GNUC__ == 2 && __GNUC_MINOR__ == 96
62#ifdef CONFIG_FRAME_POINTER
63#error This compiler cannot compile correctly with frame pointers enabled
64#endif
65#endif
66 56
67#ifdef CONFIG_X86_LOCAL_APIC 57#ifdef CONFIG_X86_LOCAL_APIC
68#include <asm/smp.h> 58#include <asm/smp.h>
69#endif 59#endif
70 60
71/* 61/*
72 * Versions of gcc older than that listed below may actually compile 62 * This is one of the first .c files built. Error out early if we have compiler
73 * and link okay, but the end product can have subtle run time bugs. 63 * trouble.
74 * To avoid associated bogus bug reports, we flatly refuse to compile 64 *
75 * with a gcc that is known to be too old from the very beginning. 65 * Versions of gcc older than that listed below may actually compile and link
66 * okay, but the end product can have subtle run time bugs. To avoid associated
67 * bogus bug reports, we flatly refuse to compile with a gcc that is known to be
68 * too old from the very beginning.
76 */ 69 */
77#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95) 70#if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 2)
78#error Sorry, your GCC is too old. It builds incorrect kernels. 71#error Sorry, your GCC is too old. It builds incorrect kernels.
79#endif 72#endif
80 73
@@ -100,6 +93,9 @@ extern void acpi_early_init(void);
100#else 93#else
101static inline void acpi_early_init(void) { } 94static inline void acpi_early_init(void) { }
102#endif 95#endif
96#ifndef CONFIG_DEBUG_RODATA
97static inline void mark_rodata_ro(void) { }
98#endif
103 99
104#ifdef CONFIG_TC 100#ifdef CONFIG_TC
105extern void tc_init(void); 101extern void tc_init(void);
@@ -487,6 +483,7 @@ asmlinkage void __init start_kernel(void)
487 init_IRQ(); 483 init_IRQ();
488 pidhash_init(); 484 pidhash_init();
489 init_timers(); 485 init_timers();
486 hrtimers_init();
490 softirq_init(); 487 softirq_init();
491 time_init(); 488 time_init();
492 489
@@ -509,6 +506,7 @@ asmlinkage void __init start_kernel(void)
509 } 506 }
510#endif 507#endif
511 vfs_caches_init_early(); 508 vfs_caches_init_early();
509 cpuset_init_early();
512 mem_init(); 510 mem_init();
513 kmem_cache_init(); 511 kmem_cache_init();
514 setup_per_cpu_pageset(); 512 setup_per_cpu_pageset();
@@ -614,9 +612,6 @@ static void __init do_basic_setup(void)
614 sysctl_init(); 612 sysctl_init();
615#endif 613#endif
616 614
617 /* Networking initialization needs a process context */
618 sock_init();
619
620 do_initcalls(); 615 do_initcalls();
621} 616}
622 617
@@ -712,6 +707,7 @@ static int init(void * unused)
712 */ 707 */
713 free_initmem(); 708 free_initmem();
714 unlock_kernel(); 709 unlock_kernel();
710 mark_rodata_ro();
715 system_state = SYSTEM_RUNNING; 711 system_state = SYSTEM_RUNNING;
716 numa_default_policy(); 712 numa_default_policy();
717 713