aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig103
-rw-r--r--init/do_mounts.c4
-rw-r--r--init/do_mounts_initrd.c3
-rw-r--r--init/init_task.c2
-rw-r--r--init/initramfs.c8
-rw-r--r--init/main.c20
6 files changed, 86 insertions, 54 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 88f334fb403b..968c539f0ac3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -20,12 +20,8 @@ config CONSTRUCTORS
20 bool 20 bool
21 depends on !UML 21 depends on !UML
22 22
23config HAVE_IRQ_WORK
24 bool
25
26config IRQ_WORK 23config IRQ_WORK
27 bool 24 bool
28 depends on HAVE_IRQ_WORK
29 25
30config BUILDTIME_EXTABLE_SORT 26config BUILDTIME_EXTABLE_SORT
31 bool 27 bool
@@ -33,35 +29,8 @@ config BUILDTIME_EXTABLE_SORT
33menu "General setup" 29menu "General setup"
34 30
35config EXPERIMENTAL 31config EXPERIMENTAL
36 bool "Prompt for development and/or incomplete code/drivers" 32 bool
37 ---help--- 33 default y
38 Some of the various things that Linux supports (such as network
39 drivers, file systems, network protocols, etc.) can be in a state
40 of development where the functionality, stability, or the level of
41 testing is not yet high enough for general use. This is usually
42 known as the "alpha-test" phase among developers. If a feature is
43 currently in alpha-test, then the developers usually discourage
44 uninformed widespread use of this feature by the general public to
45 avoid "Why doesn't this work?" type mail messages. However, active
46 testing and use of these systems is welcomed. Just be aware that it
47 may not meet the normal level of reliability or it may fail to work
48 in some special cases. Detailed bug reports from people familiar
49 with the kernel internals are usually welcomed by the developers
50 (before submitting bug reports, please read the documents
51 <file:README>, <file:MAINTAINERS>, <file:REPORTING-BUGS>,
52 <file:Documentation/BUG-HUNTING>, and
53 <file:Documentation/oops-tracing.txt> in the kernel source).
54
55 This option will also make obsoleted drivers available. These are
56 drivers that have been replaced by something else, and/or are
57 scheduled to be removed in a future kernel release.
58
59 Unless you intend to help test and develop a feature or driver that
60 falls into this category, or you have a situation that requires
61 using these features, you should probably say N here, which will
62 cause the configurator to present you with fewer choices. If
63 you say Y here, you will be offered the choice of using features or
64 drivers that are currently considered to be in the alpha-test phase.
65 34
66config BROKEN 35config BROKEN
67 bool 36 bool
@@ -247,7 +216,7 @@ config SYSVIPC_SYSCTL
247 216
248config POSIX_MQUEUE 217config POSIX_MQUEUE
249 bool "POSIX Message Queues" 218 bool "POSIX Message Queues"
250 depends on NET && EXPERIMENTAL 219 depends on NET
251 ---help--- 220 ---help---
252 POSIX variant of message queues is a part of IPC. In POSIX message 221 POSIX variant of message queues is a part of IPC. In POSIX message
253 queues every message has a priority which decides about succession 222 queues every message has a priority which decides about succession
@@ -326,10 +295,13 @@ source "kernel/time/Kconfig"
326 295
327menu "CPU/Task time and stats accounting" 296menu "CPU/Task time and stats accounting"
328 297
298config VIRT_CPU_ACCOUNTING
299 bool
300
329choice 301choice
330 prompt "Cputime accounting" 302 prompt "Cputime accounting"
331 default TICK_CPU_ACCOUNTING if !PPC64 303 default TICK_CPU_ACCOUNTING if !PPC64
332 default VIRT_CPU_ACCOUNTING if PPC64 304 default VIRT_CPU_ACCOUNTING_NATIVE if PPC64
333 305
334# Kind of a stub config for the pure tick based cputime accounting 306# Kind of a stub config for the pure tick based cputime accounting
335config TICK_CPU_ACCOUNTING 307config TICK_CPU_ACCOUNTING
@@ -342,9 +314,10 @@ config TICK_CPU_ACCOUNTING
342 314
343 If unsure, say Y. 315 If unsure, say Y.
344 316
345config VIRT_CPU_ACCOUNTING 317config VIRT_CPU_ACCOUNTING_NATIVE
346 bool "Deterministic task and CPU time accounting" 318 bool "Deterministic task and CPU time accounting"
347 depends on HAVE_VIRT_CPU_ACCOUNTING 319 depends on HAVE_VIRT_CPU_ACCOUNTING
320 select VIRT_CPU_ACCOUNTING
348 help 321 help
349 Select this option to enable more accurate task and CPU time 322 Select this option to enable more accurate task and CPU time
350 accounting. This is done by reading a CPU counter on each 323 accounting. This is done by reading a CPU counter on each
@@ -354,6 +327,23 @@ config VIRT_CPU_ACCOUNTING
354 this also enables accounting of stolen time on logically-partitioned 327 this also enables accounting of stolen time on logically-partitioned
355 systems. 328 systems.
356 329
330config VIRT_CPU_ACCOUNTING_GEN
331 bool "Full dynticks CPU time accounting"
332 depends on HAVE_CONTEXT_TRACKING && 64BIT
333 select VIRT_CPU_ACCOUNTING
334 select CONTEXT_TRACKING
335 help
336 Select this option to enable task and CPU time accounting on full
337 dynticks systems. This accounting is implemented by watching every
338 kernel-user boundaries using the context tracking subsystem.
339 The accounting is thus performed at the expense of some significant
340 overhead.
341
342 For now this is only useful if you are working on the full
343 dynticks subsystem development.
344
345 If unsure, say N.
346
357config IRQ_TIME_ACCOUNTING 347config IRQ_TIME_ACCOUNTING
358 bool "Fine granularity task level IRQ time accounting" 348 bool "Fine granularity task level IRQ time accounting"
359 depends on HAVE_IRQ_TIME_ACCOUNTING 349 depends on HAVE_IRQ_TIME_ACCOUNTING
@@ -393,7 +383,7 @@ config BSD_PROCESS_ACCT_V3
393 at <http://www.gnu.org/software/acct/>. 383 at <http://www.gnu.org/software/acct/>.
394 384
395config TASKSTATS 385config TASKSTATS
396 bool "Export task/process statistics through netlink (EXPERIMENTAL)" 386 bool "Export task/process statistics through netlink"
397 depends on NET 387 depends on NET
398 default n 388 default n
399 help 389 help
@@ -406,7 +396,7 @@ config TASKSTATS
406 Say N if unsure. 396 Say N if unsure.
407 397
408config TASK_DELAY_ACCT 398config TASK_DELAY_ACCT
409 bool "Enable per-task delay accounting (EXPERIMENTAL)" 399 bool "Enable per-task delay accounting"
410 depends on TASKSTATS 400 depends on TASKSTATS
411 help 401 help
412 Collect information on time spent by a task waiting for system 402 Collect information on time spent by a task waiting for system
@@ -417,7 +407,7 @@ config TASK_DELAY_ACCT
417 Say N if unsure. 407 Say N if unsure.
418 408
419config TASK_XACCT 409config TASK_XACCT
420 bool "Enable extended accounting over taskstats (EXPERIMENTAL)" 410 bool "Enable extended accounting over taskstats"
421 depends on TASKSTATS 411 depends on TASKSTATS
422 help 412 help
423 Collect extended task accounting data and send the data 413 Collect extended task accounting data and send the data
@@ -426,7 +416,7 @@ config TASK_XACCT
426 Say N if unsure. 416 Say N if unsure.
427 417
428config TASK_IO_ACCOUNTING 418config TASK_IO_ACCOUNTING
429 bool "Enable per-task storage I/O accounting (EXPERIMENTAL)" 419 bool "Enable per-task storage I/O accounting"
430 depends on TASK_XACCT 420 depends on TASK_XACCT
431 help 421 help
432 Collect information on the number of bytes of storage I/O which this 422 Collect information on the number of bytes of storage I/O which this
@@ -453,7 +443,7 @@ config TREE_RCU
453 443
454config TREE_PREEMPT_RCU 444config TREE_PREEMPT_RCU
455 bool "Preemptible tree-based hierarchical RCU" 445 bool "Preemptible tree-based hierarchical RCU"
456 depends on PREEMPT && SMP 446 depends on PREEMPT
457 help 447 help
458 This option selects the RCU implementation that is 448 This option selects the RCU implementation that is
459 designed for very large SMP systems with hundreds or 449 designed for very large SMP systems with hundreds or
@@ -461,6 +451,8 @@ config TREE_PREEMPT_RCU
461 is also required. It also scales down nicely to 451 is also required. It also scales down nicely to
462 smaller systems. 452 smaller systems.
463 453
454 Select this option if you are unsure.
455
464config TINY_RCU 456config TINY_RCU
465 bool "UP-only small-memory-footprint RCU" 457 bool "UP-only small-memory-footprint RCU"
466 depends on !PREEMPT && !SMP 458 depends on !PREEMPT && !SMP
@@ -486,6 +478,14 @@ config PREEMPT_RCU
486 This option enables preemptible-RCU code that is common between 478 This option enables preemptible-RCU code that is common between
487 the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations. 479 the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
488 480
481config RCU_STALL_COMMON
482 def_bool ( TREE_RCU || TREE_PREEMPT_RCU || RCU_TRACE )
483 help
484 This option enables RCU CPU stall code that is common between
485 the TINY and TREE variants of RCU. The purpose is to allow
486 the tiny variants to disable RCU CPU stall warnings, while
487 making these warnings mandatory for the tree variants.
488
489config CONTEXT_TRACKING 489config CONTEXT_TRACKING
490 bool 490 bool
491 491
@@ -880,8 +880,8 @@ config MEMCG_SWAP_ENABLED
880 select this option (if, for some reason, they need to disable it 880 select this option (if, for some reason, they need to disable it
881 then swapaccount=0 does the trick). 881 then swapaccount=0 does the trick).
882config MEMCG_KMEM 882config MEMCG_KMEM
883 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)" 883 bool "Memory Resource Controller Kernel Memory accounting"
884 depends on MEMCG && EXPERIMENTAL 884 depends on MEMCG
885 depends on SLUB || SLAB 885 depends on SLUB || SLAB
886 help 886 help
887 The Kernel Memory extension for Memory Resource Controller can limit 887 The Kernel Memory extension for Memory Resource Controller can limit
@@ -893,7 +893,7 @@ config MEMCG_KMEM
893 893
894config CGROUP_HUGETLB 894config CGROUP_HUGETLB
895 bool "HugeTLB Resource Controller for Control Groups" 895 bool "HugeTLB Resource Controller for Control Groups"
896 depends on RESOURCE_COUNTERS && HUGETLB_PAGE && EXPERIMENTAL 896 depends on RESOURCE_COUNTERS && HUGETLB_PAGE
897 default n 897 default n
898 help 898 help
899 Provides a cgroup Resource Controller for HugeTLB pages. 899 Provides a cgroup Resource Controller for HugeTLB pages.
@@ -932,7 +932,6 @@ config FAIR_GROUP_SCHED
932 932
933config CFS_BANDWIDTH 933config CFS_BANDWIDTH
934 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED" 934 bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
935 depends on EXPERIMENTAL
936 depends on FAIR_GROUP_SCHED 935 depends on FAIR_GROUP_SCHED
937 default n 936 default n
938 help 937 help
@@ -944,7 +943,6 @@ config CFS_BANDWIDTH
944 943
945config RT_GROUP_SCHED 944config RT_GROUP_SCHED
946 bool "Group scheduling for SCHED_RR/FIFO" 945 bool "Group scheduling for SCHED_RR/FIFO"
947 depends on EXPERIMENTAL
948 depends on CGROUP_SCHED 946 depends on CGROUP_SCHED
949 default n 947 default n
950 help 948 help
@@ -1026,8 +1024,7 @@ config IPC_NS
1026 different IPC objects in different namespaces. 1024 different IPC objects in different namespaces.
1027 1025
1028config USER_NS 1026config USER_NS
1029 bool "User namespace (EXPERIMENTAL)" 1027 bool "User namespace"
1030 depends on EXPERIMENTAL
1031 depends on UIDGID_CONVERTED 1028 depends on UIDGID_CONVERTED
1032 select UIDGID_STRICT_TYPE_CHECKS 1029 select UIDGID_STRICT_TYPE_CHECKS
1033 1030
@@ -1232,6 +1229,13 @@ config SYSCTL_EXCEPTION_TRACE
1232 help 1229 help
1233 Enable support for /proc/sys/debug/exception-trace. 1230 Enable support for /proc/sys/debug/exception-trace.
1234 1231
1232config SYSCTL_ARCH_UNALIGN_NO_WARN
1233 bool
1234 help
1235 Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1236 Allows arch to define/use @no_unaligned_warning to possibly warn
1237 about unaligned access emulation going on under the hood.
1238
1235config KALLSYMS 1239config KALLSYMS
1236 bool "Load all symbols for debugging/ksymoops" if EXPERT 1240 bool "Load all symbols for debugging/ksymoops" if EXPERT
1237 default y 1241 default y
@@ -1263,6 +1267,7 @@ config HOTPLUG
1263config PRINTK 1267config PRINTK
1264 default y 1268 default y
1265 bool "Enable support for printk" if EXPERT 1269 bool "Enable support for printk" if EXPERT
1270 select IRQ_WORK
1266 help 1271 help
1267 This option enables normal printk support. Removing it 1272 This option enables normal printk support. Removing it
1268 eliminates most of the message strings from the kernel image 1273 eliminates most of the message strings from the kernel image
@@ -1608,7 +1613,7 @@ config MODULE_UNLOAD
1608 1613
1609config MODULE_FORCE_UNLOAD 1614config MODULE_FORCE_UNLOAD
1610 bool "Forced module unloading" 1615 bool "Forced module unloading"
1611 depends on MODULE_UNLOAD && EXPERIMENTAL 1616 depends on MODULE_UNLOAD
1612 help 1617 help
1613 This option allows you to force a module to unload, even if the 1618 This option allows you to force a module to unload, even if the
1614 kernel believes it is unsafe: the kernel will remove the module 1619 kernel believes it is unsafe: the kernel will remove the module
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 1d1b6348f903..a2b49f2c1bd8 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -81,9 +81,9 @@ struct uuidcmp {
81 * 81 *
82 * Returns 1 if the device matches, and 0 otherwise. 82 * Returns 1 if the device matches, and 0 otherwise.
83 */ 83 */
84static int match_dev_by_uuid(struct device *dev, void *data) 84static int match_dev_by_uuid(struct device *dev, const void *data)
85{ 85{
86 struct uuidcmp *cmp = data; 86 const struct uuidcmp *cmp = data;
87 struct hd_struct *part = dev_to_part(dev); 87 struct hd_struct *part = dev_to_part(dev);
88 88
89 if (!part->info) 89 if (!part->info)
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index f9acf71b9810..a32ec1ce882b 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -61,6 +61,9 @@ static void __init handle_initrd(void)
61 sys_mkdir("/old", 0700); 61 sys_mkdir("/old", 0700);
62 sys_chdir("/old"); 62 sys_chdir("/old");
63 63
64 /* try loading default modules from initrd */
65 load_default_modules();
66
64 /* 67 /*
65 * In case that a resume from disk is carried out by linuxrc or one of 68 * In case that a resume from disk is carried out by linuxrc or one of
66 * its children, we need to tell the freezer not to wait for us. 69 * its children, we need to tell the freezer not to wait for us.
diff --git a/init/init_task.c b/init/init_task.c
index 8b2f3996b035..ba0a7f362d9e 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -2,6 +2,8 @@
2#include <linux/export.h> 2#include <linux/export.h>
3#include <linux/mqueue.h> 3#include <linux/mqueue.h>
4#include <linux/sched.h> 4#include <linux/sched.h>
5#include <linux/sched/sysctl.h>
6#include <linux/sched/rt.h>
5#include <linux/init.h> 7#include <linux/init.h>
6#include <linux/fs.h> 8#include <linux/fs.h>
7#include <linux/mm.h> 9#include <linux/mm.h>
diff --git a/init/initramfs.c b/init/initramfs.c
index 84c6bf111300..a67ef9dbda9d 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -592,7 +592,7 @@ static int __init populate_rootfs(void)
592 initrd_end - initrd_start); 592 initrd_end - initrd_start);
593 if (!err) { 593 if (!err) {
594 free_initrd(); 594 free_initrd();
595 return 0; 595 goto done;
596 } else { 596 } else {
597 clean_rootfs(); 597 clean_rootfs();
598 unpack_to_rootfs(__initramfs_start, __initramfs_size); 598 unpack_to_rootfs(__initramfs_start, __initramfs_size);
@@ -607,6 +607,7 @@ static int __init populate_rootfs(void)
607 sys_close(fd); 607 sys_close(fd);
608 free_initrd(); 608 free_initrd();
609 } 609 }
610 done:
610#else 611#else
611 printk(KERN_INFO "Unpacking initramfs...\n"); 612 printk(KERN_INFO "Unpacking initramfs...\n");
612 err = unpack_to_rootfs((char *)initrd_start, 613 err = unpack_to_rootfs((char *)initrd_start,
@@ -615,6 +616,11 @@ static int __init populate_rootfs(void)
615 printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err); 616 printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err);
616 free_initrd(); 617 free_initrd();
617#endif 618#endif
619 /*
620 * Try loading default modules from initramfs. This gives
621 * us a chance to load before device_initcalls.
622 */
623 load_default_modules();
618 } 624 }
619 return 0; 625 return 0;
620} 626}
diff --git a/init/main.c b/init/main.c
index 92d728a32d51..63534a141b4e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -70,6 +70,8 @@
70#include <linux/perf_event.h> 70#include <linux/perf_event.h>
71#include <linux/file.h> 71#include <linux/file.h>
72#include <linux/ptrace.h> 72#include <linux/ptrace.h>
73#include <linux/blkdev.h>
74#include <linux/elevator.h>
73 75
74#include <asm/io.h> 76#include <asm/io.h>
75#include <asm/bugs.h> 77#include <asm/bugs.h>
@@ -604,7 +606,7 @@ asmlinkage void __init start_kernel(void)
604 pidmap_init(); 606 pidmap_init();
605 anon_vma_init(); 607 anon_vma_init();
606#ifdef CONFIG_X86 608#ifdef CONFIG_X86
607 if (efi_enabled) 609 if (efi_enabled(EFI_RUNTIME_SERVICES))
608 efi_enter_virtual_mode(); 610 efi_enter_virtual_mode();
609#endif 611#endif
610 thread_info_cache_init(); 612 thread_info_cache_init();
@@ -632,7 +634,7 @@ asmlinkage void __init start_kernel(void)
632 acpi_early_init(); /* before LAPIC and SMP init */ 634 acpi_early_init(); /* before LAPIC and SMP init */
633 sfi_init_late(); 635 sfi_init_late();
634 636
635 if (efi_enabled) { 637 if (efi_enabled(EFI_RUNTIME_SERVICES)) {
636 efi_late_init(); 638 efi_late_init();
637 efi_free_boot_services(); 639 efi_free_boot_services();
638 } 640 }
@@ -794,6 +796,17 @@ static void __init do_pre_smp_initcalls(void)
794 do_one_initcall(*fn); 796 do_one_initcall(*fn);
795} 797}
796 798
799/*
800 * This function requests modules which should be loaded by default and is
801 * called twice right after initrd is mounted and right before init is
802 * exec'd. If such modules are on either initrd or rootfs, they will be
803 * loaded before control is passed to userland.
804 */
805void __init load_default_modules(void)
806{
807 load_default_elevator_module();
808}
809
797static int run_init_process(const char *init_filename) 810static int run_init_process(const char *init_filename)
798{ 811{
799 argv_init[0] = init_filename; 812 argv_init[0] = init_filename;
@@ -900,4 +913,7 @@ static noinline void __init kernel_init_freeable(void)
900 * we're essentially up and running. Get rid of the 913 * we're essentially up and running. Get rid of the
901 * initmem segments and start the user-mode stuff.. 914 * initmem segments and start the user-mode stuff..
902 */ 915 */
916
917 /* rootfs is available now, try loading default modules */
918 load_default_modules();
903} 919}