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.c12
6 files changed, 59 insertions, 18 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 14c483d2b7c9..7be4d3836745 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 07c8658ffca5..3bbf93be744c 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>
@@ -491,6 +492,11 @@ static int __init do_early_param(char *param, char *val)
491 return 0; 492 return 0;
492} 493}
493 494
495void __init parse_early_options(char *cmdline)
496{
497 parse_args("early options", cmdline, NULL, 0, do_early_param);
498}
499
494/* Arch code calls this early on, or if not, just before other parsing. */ 500/* Arch code calls this early on, or if not, just before other parsing. */
495void __init parse_early_param(void) 501void __init parse_early_param(void)
496{ 502{
@@ -502,7 +508,7 @@ void __init parse_early_param(void)
502 508
503 /* All fall through to do_early_param. */ 509 /* All fall through to do_early_param. */
504 strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE); 510 strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE);
505 parse_args("early options", tmp_cmdline, NULL, 0, do_early_param); 511 parse_early_options(tmp_cmdline);
506 done = 1; 512 done = 1;
507} 513}
508 514
@@ -648,6 +654,7 @@ asmlinkage void __init start_kernel(void)
648 enable_debug_pagealloc(); 654 enable_debug_pagealloc();
649 cpu_hotplug_init(); 655 cpu_hotplug_init();
650 kmem_cache_init(); 656 kmem_cache_init();
657 kmemtrace_init();
651 debug_objects_mem_init(); 658 debug_objects_mem_init();
652 idr_init_cache(); 659 idr_init_cache();
653 setup_per_cpu_pageset(); 660 setup_per_cpu_pageset();
@@ -769,6 +776,7 @@ static void __init do_basic_setup(void)
769{ 776{
770 rcu_init_sched(); /* needed by module_init stage. */ 777 rcu_init_sched(); /* needed by module_init stage. */
771 init_workqueues(); 778 init_workqueues();
779 cpuset_init_smp();
772 usermodehelper_init(); 780 usermodehelper_init();
773 driver_init(); 781 driver_init();
774 init_irq_proc(); 782 init_irq_proc();
@@ -863,8 +871,6 @@ static int __init kernel_init(void * unused)
863 smp_init(); 871 smp_init();
864 sched_init_smp(); 872 sched_init_smp();
865 873
866 cpuset_init_smp();
867
868 do_basic_setup(); 874 do_basic_setup();
869 875
870 /* 876 /*