aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig46
-rw-r--r--init/do_mounts.c1
-rw-r--r--init/do_mounts.h1
-rw-r--r--init/do_mounts_md.c5
-rw-r--r--init/initramfs.c12
-rw-r--r--init/main.c11
6 files changed, 56 insertions, 20 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 26ac8772464d..d4e9671347ee 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -208,6 +208,12 @@ config POSIX_MQUEUE
208 208
209 If unsure, say Y. 209 If unsure, say Y.
210 210
211config POSIX_MQUEUE_SYSCTL
212 bool
213 depends on POSIX_MQUEUE
214 depends on SYSCTL
215 default y
216
211config BSD_PROCESS_ACCT 217config BSD_PROCESS_ACCT
212 bool "BSD Process Accounting" 218 bool "BSD Process Accounting"
213 help 219 help
@@ -531,7 +537,7 @@ config CGROUP_DEVICE
531 537
532config CPUSETS 538config CPUSETS
533 bool "Cpuset support" 539 bool "Cpuset support"
534 depends on SMP && CGROUPS 540 depends on CGROUPS
535 help 541 help
536 This option will let you create and manage CPUSETs which 542 This option will let you create and manage CPUSETs which
537 allow dynamically partitioning a system into sets of CPUs and 543 allow dynamically partitioning a system into sets of CPUs and
@@ -565,7 +571,7 @@ config CGROUP_MEM_RES_CTLR
565 select MM_OWNER 571 select MM_OWNER
566 help 572 help
567 Provides a memory resource controller that manages both anonymous 573 Provides a memory resource controller that manages both anonymous
568 memory and page cache. (See Documentation/controllers/memory.txt) 574 memory and page cache. (See Documentation/cgroups/memory.txt)
569 575
570 Note that setting this option increases fixed memory overhead 576 Note that setting this option increases fixed memory overhead
571 associated with each page of memory in the system. By this, 577 associated with each page of memory in the system. By this,
@@ -597,6 +603,8 @@ config CGROUP_MEM_RES_CTLR_SWAP
597 is disabled by boot option, this will be automatically disabled and 603 is disabled by boot option, this will be automatically disabled and
598 there will be no overhead from this. Even when you set this config=y, 604 there will be no overhead from this. Even when you set this config=y,
599 if boot option "noswapaccount" is set, swap will not be accounted. 605 if boot option "noswapaccount" is set, swap will not be accounted.
606 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
607 size is 4096bytes, 512k per 1Gbytes of swap.
600 608
601endif # CGROUPS 609endif # CGROUPS
602 610
@@ -668,10 +676,10 @@ config UTS_NS
668 676
669config IPC_NS 677config IPC_NS
670 bool "IPC namespace" 678 bool "IPC namespace"
671 depends on NAMESPACES && SYSVIPC 679 depends on NAMESPACES && (SYSVIPC || POSIX_MQUEUE)
672 help 680 help
673 In this namespace tasks work with IPC ids which correspond to 681 In this namespace tasks work with IPC ids which correspond to
674 different IPC objects in different namespaces 682 different IPC objects in different namespaces.
675 683
676config USER_NS 684config USER_NS
677 bool "User namespace (EXPERIMENTAL)" 685 bool "User namespace (EXPERIMENTAL)"
@@ -687,7 +695,7 @@ config PID_NS
687 depends on NAMESPACES && EXPERIMENTAL 695 depends on NAMESPACES && EXPERIMENTAL
688 help 696 help
689 Support process id namespaces. This allows having multiple 697 Support process id namespaces. This allows having multiple
690 process with the same pid as long as they are in different 698 processes with the same pid as long as they are in different
691 pid namespaces. This is a building block of containers. 699 pid namespaces. This is a building block of containers.
692 700
693 Unless you want to work with an experimental feature 701 Unless you want to work with an experimental feature
@@ -800,6 +808,14 @@ config KALLSYMS_EXTRA_PASS
800 you wait for kallsyms to be fixed. 808 you wait for kallsyms to be fixed.
801 809
802 810
811config STRIP_ASM_SYMS
812 bool "Strip assembler-generated symbols during link"
813 default n
814 help
815 Strip internal assembler-generated symbols during a link (symbols
816 that look like '.Lxxx') so they don't pollute the output of
817 get_wchan() and suchlike.
818
803config HOTPLUG 819config HOTPLUG
804 bool "Support for hot-pluggable devices" if EMBEDDED 820 bool "Support for hot-pluggable devices" if EMBEDDED
805 default y 821 default y
@@ -952,7 +968,7 @@ config COMPAT_BRK
952 Randomizing heap placement makes heap exploits harder, but it 968 Randomizing heap placement makes heap exploits harder, but it
953 also breaks ancient binaries (including anything libc5 based). 969 also breaks ancient binaries (including anything libc5 based).
954 This option changes the bootup default to heap randomization 970 This option changes the bootup default to heap randomization
955 disabled, and can be overriden runtime by setting 971 disabled, and can be overridden at runtime by setting
956 /proc/sys/kernel/randomize_va_space to 2. 972 /proc/sys/kernel/randomize_va_space to 2.
957 973
958 On non-ancient distros (post-2000 ones) N is usually a safe choice. 974 On non-ancient distros (post-2000 ones) N is usually a safe choice.
@@ -1005,13 +1021,27 @@ config TRACEPOINTS
1005 1021
1006config MARKERS 1022config MARKERS
1007 bool "Activate markers" 1023 bool "Activate markers"
1008 depends on TRACEPOINTS 1024 select TRACEPOINTS
1009 help 1025 help
1010 Place an empty function call at each marker site. Can be 1026 Place an empty function call at each marker site. Can be
1011 dynamically changed for a probe function. 1027 dynamically changed for a probe function.
1012 1028
1013source "arch/Kconfig" 1029source "arch/Kconfig"
1014 1030
1031config SLOW_WORK
1032 default n
1033 bool
1034 help
1035 The slow work thread pool provides a number of dynamically allocated
1036 threads that can be used by the kernel to perform operations that
1037 take a relatively long time.
1038
1039 An example of this would be CacheFiles doing a path lookup followed
1040 by a series of mkdirs and a create call, all of which have to touch
1041 disk.
1042
1043 See Documentation/slow-work.txt.
1044
1015endmenu # General setup 1045endmenu # General setup
1016 1046
1017config HAVE_GENERIC_DMA_COHERENT 1047config HAVE_GENERIC_DMA_COHERENT
@@ -1110,7 +1140,7 @@ config INIT_ALL_POSSIBLE
1110 cpu_possible_map, some of them chose to initialize cpu_possible_map 1140 cpu_possible_map, some of them chose to initialize cpu_possible_map
1111 with all 1s, and others with all 0s. When they were centralised, 1141 with all 1s, and others with all 0s. When they were centralised,
1112 it was better to provide this option than to break all the archs 1142 it was better to provide this option than to break all the archs
1113 and have several arch maintainers persuing me down dark alleys. 1143 and have several arch maintainers pursuing me down dark alleys.
1114 1144
1115config STOP_MACHINE 1145config STOP_MACHINE
1116 bool 1146 bool
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 8d4ff5afc1d8..dd7ee5f203f3 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -14,6 +14,7 @@
14#include <linux/fs.h> 14#include <linux/fs.h>
15#include <linux/initrd.h> 15#include <linux/initrd.h>
16#include <linux/async.h> 16#include <linux/async.h>
17#include <linux/fs_struct.h>
17 18
18#include <linux/nfs_fs.h> 19#include <linux/nfs_fs.h>
19#include <linux/nfs_fs_sb.h> 20#include <linux/nfs_fs_sb.h>
diff --git a/init/do_mounts.h b/init/do_mounts.h
index 9aa968d54329..f5b978a9bb92 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -1,4 +1,5 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <linux/blkdev.h>
2#include <linux/init.h> 3#include <linux/init.h>
3#include <linux/syscalls.h> 4#include <linux/syscalls.h>
4#include <linux/unistd.h> 5#include <linux/unistd.h>
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 9bdddbcb3d6a..69aebbf8fd2d 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -1,5 +1,6 @@
1#include <linux/delay.h> 1#include <linux/delay.h>
2#include <linux/raid/md.h> 2#include <linux/raid/md_u.h>
3#include <linux/raid/md_p.h>
3 4
4#include "do_mounts.h" 5#include "do_mounts.h"
5 6
@@ -112,8 +113,6 @@ static int __init md_setup(char *str)
112 return 1; 113 return 1;
113} 114}
114 115
115#define MdpMinorShift 6
116
117static void __init md_setup_drive(void) 116static void __init md_setup_drive(void)
118{ 117{
119 int minor, i, ent, partitioned; 118 int minor, i, ent, partitioned;
diff --git a/init/initramfs.c b/init/initramfs.c
index 619c1baf7701..9ee7b7810417 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -310,7 +310,8 @@ static int __init do_name(void)
310 if (wfd >= 0) { 310 if (wfd >= 0) {
311 sys_fchown(wfd, uid, gid); 311 sys_fchown(wfd, uid, gid);
312 sys_fchmod(wfd, mode); 312 sys_fchmod(wfd, mode);
313 sys_ftruncate(wfd, body_len); 313 if (body_len)
314 sys_ftruncate(wfd, body_len);
314 vcollected = kstrdup(collected, GFP_KERNEL); 315 vcollected = kstrdup(collected, GFP_KERNEL);
315 state = CopyFile; 316 state = CopyFile;
316 } 317 }
@@ -515,6 +516,7 @@ skip:
515 initrd_end = 0; 516 initrd_end = 0;
516} 517}
517 518
519#ifdef CONFIG_BLK_DEV_RAM
518#define BUF_SIZE 1024 520#define BUF_SIZE 1024
519static void __init clean_rootfs(void) 521static void __init clean_rootfs(void)
520{ 522{
@@ -561,6 +563,7 @@ static void __init clean_rootfs(void)
561 sys_close(fd); 563 sys_close(fd);
562 kfree(buf); 564 kfree(buf);
563} 565}
566#endif
564 567
565static int __init populate_rootfs(void) 568static int __init populate_rootfs(void)
566{ 569{
@@ -571,11 +574,11 @@ static int __init populate_rootfs(void)
571 if (initrd_start) { 574 if (initrd_start) {
572#ifdef CONFIG_BLK_DEV_RAM 575#ifdef CONFIG_BLK_DEV_RAM
573 int fd; 576 int fd;
574 printk(KERN_INFO "checking if image is initramfs..."); 577 printk(KERN_INFO "checking if image is initramfs...\n");
575 err = unpack_to_rootfs((char *)initrd_start, 578 err = unpack_to_rootfs((char *)initrd_start,
576 initrd_end - initrd_start); 579 initrd_end - initrd_start);
577 if (!err) { 580 if (!err) {
578 printk(" it is\n"); 581 printk(KERN_INFO "rootfs image is initramfs; unpacking...\n");
579 free_initrd(); 582 free_initrd();
580 return 0; 583 return 0;
581 } else { 584 } else {
@@ -583,7 +586,8 @@ static int __init populate_rootfs(void)
583 unpack_to_rootfs(__initramfs_start, 586 unpack_to_rootfs(__initramfs_start,
584 __initramfs_end - __initramfs_start); 587 __initramfs_end - __initramfs_start);
585 } 588 }
586 printk("it isn't (%s); looks like an initrd\n", err); 589 printk(KERN_INFO "rootfs image is not initramfs (%s)"
590 "; looks like an initrd\n", err);
587 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700); 591 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
588 if (fd >= 0) { 592 if (fd >= 0) {
589 sys_write(fd, (char *)initrd_start, 593 sys_write(fd, (char *)initrd_start,
diff --git a/init/main.c b/init/main.c
index 6bf83afd654d..3585f073d636 100644
--- a/init/main.c
+++ b/init/main.c
@@ -71,6 +71,7 @@
71#include <asm/setup.h> 71#include <asm/setup.h>
72#include <asm/sections.h> 72#include <asm/sections.h>
73#include <asm/cacheflush.h> 73#include <asm/cacheflush.h>
74#include <trace/kmemtrace.h>
74 75
75#ifdef CONFIG_X86_LOCAL_APIC 76#ifdef CONFIG_X86_LOCAL_APIC
76#include <asm/smp.h> 77#include <asm/smp.h>
@@ -407,8 +408,7 @@ static void __init smp_init(void)
407 * Set up the current CPU as possible to migrate to. 408 * Set up the current CPU as possible to migrate to.
408 * The other ones will be done by cpu_up/cpu_down() 409 * The other ones will be done by cpu_up/cpu_down()
409 */ 410 */
410 cpu = smp_processor_id(); 411 set_cpu_active(smp_processor_id(), true);
411 cpu_set(cpu, cpu_active_map);
412 412
413 /* FIXME: This should be done in userspace --RR */ 413 /* FIXME: This should be done in userspace --RR */
414 for_each_present_cpu(cpu) { 414 for_each_present_cpu(cpu) {
@@ -649,6 +649,7 @@ asmlinkage void __init start_kernel(void)
649 enable_debug_pagealloc(); 649 enable_debug_pagealloc();
650 cpu_hotplug_init(); 650 cpu_hotplug_init();
651 kmem_cache_init(); 651 kmem_cache_init();
652 kmemtrace_init();
652 debug_objects_mem_init(); 653 debug_objects_mem_init();
653 idr_init_cache(); 654 idr_init_cache();
654 setup_per_cpu_pageset(); 655 setup_per_cpu_pageset();
@@ -770,6 +771,7 @@ static void __init do_basic_setup(void)
770{ 771{
771 rcu_init_sched(); /* needed by module_init stage. */ 772 rcu_init_sched(); /* needed by module_init stage. */
772 init_workqueues(); 773 init_workqueues();
774 cpuset_init_smp();
773 usermodehelper_init(); 775 usermodehelper_init();
774 driver_init(); 776 driver_init();
775 init_irq_proc(); 777 init_irq_proc();
@@ -794,6 +796,7 @@ static void run_init_process(char *init_filename)
794 * makes it inline to init() and it becomes part of init.text section 796 * makes it inline to init() and it becomes part of init.text section
795 */ 797 */
796static noinline int init_post(void) 798static noinline int init_post(void)
799 __releases(kernel_lock)
797{ 800{
798 /* need to finish all async __init code before freeing the memory */ 801 /* need to finish all async __init code before freeing the memory */
799 async_synchronize_full(); 802 async_synchronize_full();
@@ -842,7 +845,7 @@ static int __init kernel_init(void * unused)
842 /* 845 /*
843 * init can run on any cpu. 846 * init can run on any cpu.
844 */ 847 */
845 set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR); 848 set_cpus_allowed_ptr(current, cpu_all_mask);
846 /* 849 /*
847 * Tell the world that we're going to be the grim 850 * Tell the world that we're going to be the grim
848 * reaper of innocent orphaned children. 851 * reaper of innocent orphaned children.
@@ -863,8 +866,6 @@ static int __init kernel_init(void * unused)
863 smp_init(); 866 smp_init();
864 sched_init_smp(); 867 sched_init_smp();
865 868
866 cpuset_init_smp();
867
868 do_basic_setup(); 869 do_basic_setup();
869 870
870 /* 871 /*