aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig81
-rw-r--r--init/do_mounts.c2
-rw-r--r--init/main.c39
3 files changed, 58 insertions, 64 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 8e8b76d8a272..09c5c6431f42 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -331,7 +331,8 @@ config TREE_PREEMPT_RCU
331 This option selects the RCU implementation that is 331 This option selects the RCU implementation that is
332 designed for very large SMP systems with hundreds or 332 designed for very large SMP systems with hundreds or
333 thousands of CPUs, but for which real-time response 333 thousands of CPUs, but for which real-time response
334 is also required. 334 is also required. It also scales down nicely to
335 smaller systems.
335 336
336endchoice 337endchoice
337 338
@@ -915,31 +916,41 @@ config AIO
915 by some high performance threaded applications. Disabling 916 by some high performance threaded applications. Disabling
916 this option saves about 7k. 917 this option saves about 7k.
917 918
918config HAVE_PERF_COUNTERS 919config HAVE_PERF_EVENTS
919 bool 920 bool
920 help 921 help
921 See tools/perf/design.txt for details. 922 See tools/perf/design.txt for details.
922 923
923menu "Performance Counters" 924config PERF_USE_VMALLOC
925 bool
926 help
927 See tools/perf/design.txt for details
928
929menu "Kernel Performance Events And Counters"
924 930
925config PERF_COUNTERS 931config PERF_EVENTS
926 bool "Kernel Performance Counters" 932 bool "Kernel performance events and counters"
927 default y if PROFILING 933 default y if (PROFILING || PERF_COUNTERS)
928 depends on HAVE_PERF_COUNTERS 934 depends on HAVE_PERF_EVENTS
929 select ANON_INODES 935 select ANON_INODES
930 help 936 help
931 Enable kernel support for performance counter hardware. 937 Enable kernel support for various performance events provided
938 by software and hardware.
939
940 Software events are supported either build-in or via the
941 use of generic tracepoints.
932 942
933 Performance counters are special hardware registers available 943 Most modern CPUs support performance events via performance
934 on most modern CPUs. These registers count the number of certain 944 counter registers. These registers count the number of certain
935 types of hw events: such as instructions executed, cachemisses 945 types of hw events: such as instructions executed, cachemisses
936 suffered, or branches mis-predicted - without slowing down the 946 suffered, or branches mis-predicted - without slowing down the
937 kernel or applications. These registers can also trigger interrupts 947 kernel or applications. These registers can also trigger interrupts
938 when a threshold number of events have passed - and can thus be 948 when a threshold number of events have passed - and can thus be
939 used to profile the code that runs on that CPU. 949 used to profile the code that runs on that CPU.
940 950
941 The Linux Performance Counter subsystem provides an abstraction of 951 The Linux Performance Event subsystem provides an abstraction of
942 these hardware capabilities, available via a system call. It 952 these software and hardware cevent apabilities, available via a
953 system call and used by the "perf" utility in tools/perf/. It
943 provides per task and per CPU counters, and it provides event 954 provides per task and per CPU counters, and it provides event
944 capabilities on top of those. 955 capabilities on top of those.
945 956
@@ -947,17 +958,42 @@ config PERF_COUNTERS
947 958
948config EVENT_PROFILE 959config EVENT_PROFILE
949 bool "Tracepoint profiling sources" 960 bool "Tracepoint profiling sources"
950 depends on PERF_COUNTERS && EVENT_TRACING 961 depends on PERF_EVENTS && EVENT_TRACING
951 default y 962 default y
952 help 963 help
953 Allow the use of tracepoints as software performance counters. 964 Allow the use of tracepoints as software performance events.
954 965
955 When this is enabled, you can create perf counters based on 966 When this is enabled, you can create perf events based on
956 tracepoints using PERF_TYPE_TRACEPOINT and the tracepoint ID 967 tracepoints using PERF_TYPE_TRACEPOINT and the tracepoint ID
957 found in debugfs://tracing/events/*/*/id. (The -e/--events 968 found in debugfs://tracing/events/*/*/id. (The -e/--events
958 option to the perf tool can parse and interpret symbolic 969 option to the perf tool can parse and interpret symbolic
959 tracepoints, in the subsystem:tracepoint_name format.) 970 tracepoints, in the subsystem:tracepoint_name format.)
960 971
972config PERF_COUNTERS
973 bool "Kernel performance counters (old config option)"
974 depends on HAVE_PERF_EVENTS
975 help
976 This config has been obsoleted by the PERF_EVENTS
977 config option - please see that one for details.
978
979 It has no effect on the kernel whether you enable
980 it or not, it is a compatibility placeholder.
981
982 Say N if unsure.
983
984config DEBUG_PERF_USE_VMALLOC
985 default n
986 bool "Debug: use vmalloc to back perf mmap() buffers"
987 depends on PERF_EVENTS && DEBUG_KERNEL
988 select PERF_USE_VMALLOC
989 help
990 Use vmalloc memory to back perf mmap() buffers.
991
992 Mostly useful for debugging the vmalloc code on platforms
993 that don't require it.
994
995 Say N if unsure.
996
961endmenu 997endmenu
962 998
963config VM_EVENT_COUNTERS 999config VM_EVENT_COUNTERS
@@ -988,14 +1024,6 @@ config SLUB_DEBUG
988 SLUB sysfs support. /sys/slab will not exist and there will be 1024 SLUB sysfs support. /sys/slab will not exist and there will be
989 no support for cache validation etc. 1025 no support for cache validation etc.
990 1026
991config STRIP_ASM_SYMS
992 bool "Strip assembler-generated symbols during link"
993 default n
994 help
995 Strip internal assembler-generated symbols during a link (symbols
996 that look like '.Lxxx') so they don't pollute the output of
997 get_wchan() and suchlike.
998
999config COMPAT_BRK 1027config COMPAT_BRK
1000 bool "Disable heap randomization" 1028 bool "Disable heap randomization"
1001 default y 1029 default y
@@ -1054,13 +1082,6 @@ config PROFILING
1054config TRACEPOINTS 1082config TRACEPOINTS
1055 bool 1083 bool
1056 1084
1057config MARKERS
1058 bool "Activate markers"
1059 select TRACEPOINTS
1060 help
1061 Place an empty function call at each marker site. Can be
1062 dynamically changed for a probe function.
1063
1064source "arch/Kconfig" 1085source "arch/Kconfig"
1065 1086
1066config SLOW_WORK 1087config SLOW_WORK
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 093f65915501..bb008d064c1a 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -415,7 +415,7 @@ void __init prepare_namespace(void)
415 415
416 mount_root(); 416 mount_root();
417out: 417out:
418 devtmpfs_mount("dev");
418 sys_mount(".", "/", NULL, MS_MOVE, NULL); 419 sys_mount(".", "/", NULL, MS_MOVE, NULL);
419 sys_chroot("."); 420 sys_chroot(".");
420} 421}
421
diff --git a/init/main.c b/init/main.c
index b34fd8e5edef..5988debfc505 100644
--- a/init/main.c
+++ b/init/main.c
@@ -18,7 +18,6 @@
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/ctype.h> 19#include <linux/ctype.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/utsname.h>
22#include <linux/ioport.h> 21#include <linux/ioport.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/smp_lock.h> 23#include <linux/smp_lock.h>
@@ -68,6 +67,8 @@
68#include <linux/async.h> 67#include <linux/async.h>
69#include <linux/kmemcheck.h> 68#include <linux/kmemcheck.h>
70#include <linux/kmemtrace.h> 69#include <linux/kmemtrace.h>
70#include <linux/sfi.h>
71#include <linux/shmem_fs.h>
71#include <trace/boot.h> 72#include <trace/boot.h>
72 73
73#include <asm/io.h> 74#include <asm/io.h>
@@ -353,17 +354,11 @@ static void __init smp_init(void)
353#define smp_init() do { } while (0) 354#define smp_init() do { } while (0)
354#endif 355#endif
355 356
356static inline void setup_per_cpu_areas(void) { }
357static inline void setup_nr_cpu_ids(void) { } 357static inline void setup_nr_cpu_ids(void) { }
358static inline void smp_prepare_cpus(unsigned int maxcpus) { } 358static inline void smp_prepare_cpus(unsigned int maxcpus) { }
359 359
360#else 360#else
361 361
362#if NR_CPUS > BITS_PER_LONG
363cpumask_t cpu_mask_all __read_mostly = CPU_MASK_ALL;
364EXPORT_SYMBOL(cpu_mask_all);
365#endif
366
367/* Setup number of possible processor ids */ 362/* Setup number of possible processor ids */
368int nr_cpu_ids __read_mostly = NR_CPUS; 363int nr_cpu_ids __read_mostly = NR_CPUS;
369EXPORT_SYMBOL(nr_cpu_ids); 364EXPORT_SYMBOL(nr_cpu_ids);
@@ -374,29 +369,6 @@ static void __init setup_nr_cpu_ids(void)
374 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; 369 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
375} 370}
376 371
377#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
378unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
379
380EXPORT_SYMBOL(__per_cpu_offset);
381
382static void __init setup_per_cpu_areas(void)
383{
384 unsigned long size, i;
385 char *ptr;
386 unsigned long nr_possible_cpus = num_possible_cpus();
387
388 /* Copy section for each CPU (we discard the original) */
389 size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE);
390 ptr = alloc_bootmem_pages(size * nr_possible_cpus);
391
392 for_each_possible_cpu(i) {
393 __per_cpu_offset[i] = ptr - __per_cpu_start;
394 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
395 ptr += size;
396 }
397}
398#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
399
400/* Called by boot processor to activate the rest. */ 372/* Called by boot processor to activate the rest. */
401static void __init smp_init(void) 373static void __init smp_init(void)
402{ 374{
@@ -691,12 +663,12 @@ asmlinkage void __init start_kernel(void)
691#endif 663#endif
692 thread_info_cache_init(); 664 thread_info_cache_init();
693 cred_init(); 665 cred_init();
694 fork_init(num_physpages); 666 fork_init(totalram_pages);
695 proc_caches_init(); 667 proc_caches_init();
696 buffer_init(); 668 buffer_init();
697 key_init(); 669 key_init();
698 security_init(); 670 security_init();
699 vfs_caches_init(num_physpages); 671 vfs_caches_init(totalram_pages);
700 radix_tree_init(); 672 radix_tree_init();
701 signals_init(); 673 signals_init();
702 /* rootfs populating might need page-writeback */ 674 /* rootfs populating might need page-writeback */
@@ -712,6 +684,7 @@ asmlinkage void __init start_kernel(void)
712 check_bugs(); 684 check_bugs();
713 685
714 acpi_early_init(); /* before LAPIC and SMP init */ 686 acpi_early_init(); /* before LAPIC and SMP init */
687 sfi_init_late();
715 688
716 ftrace_init(); 689 ftrace_init();
717 690
@@ -805,10 +778,10 @@ static void __init do_initcalls(void)
805 */ 778 */
806static void __init do_basic_setup(void) 779static void __init do_basic_setup(void)
807{ 780{
808 rcu_init_sched(); /* needed by module_init stage. */
809 init_workqueues(); 781 init_workqueues();
810 cpuset_init_smp(); 782 cpuset_init_smp();
811 usermodehelper_init(); 783 usermodehelper_init();
784 init_tmpfs();
812 driver_init(); 785 driver_init();
813 init_irq_proc(); 786 init_irq_proc();
814 do_ctors(); 787 do_ctors();