diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 22 | ||||
-rw-r--r-- | init/Makefile | 8 | ||||
-rw-r--r-- | init/main.c | 25 | ||||
-rw-r--r-- | init/version.c | 4 |
4 files changed, 36 insertions, 23 deletions
diff --git a/init/Kconfig b/init/Kconfig index 54c655ce9c04..a23da9f01803 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -1079,6 +1079,28 @@ config SLOB | |||
1079 | 1079 | ||
1080 | endchoice | 1080 | endchoice |
1081 | 1081 | ||
1082 | config MMAP_ALLOW_UNINITIALIZED | ||
1083 | bool "Allow mmapped anonymous memory to be uninitialized" | ||
1084 | depends on EMBEDDED && !MMU | ||
1085 | default n | ||
1086 | help | ||
1087 | Normally, and according to the Linux spec, anonymous memory obtained | ||
1088 | from mmap() has it's contents cleared before it is passed to | ||
1089 | userspace. Enabling this config option allows you to request that | ||
1090 | mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus | ||
1091 | providing a huge performance boost. If this option is not enabled, | ||
1092 | then the flag will be ignored. | ||
1093 | |||
1094 | This is taken advantage of by uClibc's malloc(), and also by | ||
1095 | ELF-FDPIC binfmt's brk and stack allocator. | ||
1096 | |||
1097 | Because of the obvious security issues, this option should only be | ||
1098 | enabled on embedded devices where you control what is run in | ||
1099 | userspace. Since that isn't generally a problem on no-MMU systems, | ||
1100 | it is normally safe to say Y here. | ||
1101 | |||
1102 | See Documentation/nommu-mmap.txt for more information. | ||
1103 | |||
1082 | config PROFILING | 1104 | config PROFILING |
1083 | bool "Profiling support (EXPERIMENTAL)" | 1105 | bool "Profiling support (EXPERIMENTAL)" |
1084 | help | 1106 | help |
diff --git a/init/Makefile b/init/Makefile index 4a243df426f7..0bf677aa0872 100644 --- a/init/Makefile +++ b/init/Makefile | |||
@@ -15,12 +15,8 @@ mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o | |||
15 | mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o | 15 | mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o |
16 | mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o | 16 | mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o |
17 | 17 | ||
18 | # files to be removed upon make clean | ||
19 | clean-files := ../include/linux/compile.h | ||
20 | |||
21 | # dependencies on generated files need to be listed explicitly | 18 | # dependencies on generated files need to be listed explicitly |
22 | 19 | $(obj)/version.o: include/generated/compile.h | |
23 | $(obj)/version.o: include/linux/compile.h | ||
24 | 20 | ||
25 | # compile.h changes depending on hostname, generation number, etc, | 21 | # compile.h changes depending on hostname, generation number, etc, |
26 | # so we regenerate it always. | 22 | # so we regenerate it always. |
@@ -30,7 +26,7 @@ $(obj)/version.o: include/linux/compile.h | |||
30 | chk_compile.h = : | 26 | chk_compile.h = : |
31 | quiet_chk_compile.h = echo ' CHK $@' | 27 | quiet_chk_compile.h = echo ' CHK $@' |
32 | silent_chk_compile.h = : | 28 | silent_chk_compile.h = : |
33 | include/linux/compile.h: FORCE | 29 | include/generated/compile.h: FORCE |
34 | @$($(quiet)chk_compile.h) | 30 | @$($(quiet)chk_compile.h) |
35 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ | 31 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ |
36 | "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)" | 32 | "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)" |
diff --git a/init/main.c b/init/main.c index 4051d75dd2d6..dac44a9356a5 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -369,12 +369,6 @@ static void __init smp_init(void) | |||
369 | { | 369 | { |
370 | unsigned int cpu; | 370 | unsigned int cpu; |
371 | 371 | ||
372 | /* | ||
373 | * Set up the current CPU as possible to migrate to. | ||
374 | * The other ones will be done by cpu_up/cpu_down() | ||
375 | */ | ||
376 | set_cpu_active(smp_processor_id(), true); | ||
377 | |||
378 | /* FIXME: This should be done in userspace --RR */ | 372 | /* FIXME: This should be done in userspace --RR */ |
379 | for_each_present_cpu(cpu) { | 373 | for_each_present_cpu(cpu) { |
380 | if (num_online_cpus() >= setup_max_cpus) | 374 | if (num_online_cpus() >= setup_max_cpus) |
@@ -486,6 +480,7 @@ static void __init boot_cpu_init(void) | |||
486 | int cpu = smp_processor_id(); | 480 | int cpu = smp_processor_id(); |
487 | /* Mark the boot cpu "present", "online" etc for SMP and UP case */ | 481 | /* Mark the boot cpu "present", "online" etc for SMP and UP case */ |
488 | set_cpu_online(cpu, true); | 482 | set_cpu_online(cpu, true); |
483 | set_cpu_active(cpu, true); | ||
489 | set_cpu_present(cpu, true); | 484 | set_cpu_present(cpu, true); |
490 | set_cpu_possible(cpu, true); | 485 | set_cpu_possible(cpu, true); |
491 | } | 486 | } |
@@ -691,10 +686,10 @@ asmlinkage void __init start_kernel(void) | |||
691 | static void __init do_ctors(void) | 686 | static void __init do_ctors(void) |
692 | { | 687 | { |
693 | #ifdef CONFIG_CONSTRUCTORS | 688 | #ifdef CONFIG_CONSTRUCTORS |
694 | ctor_fn_t *call = (ctor_fn_t *) __ctors_start; | 689 | ctor_fn_t *fn = (ctor_fn_t *) __ctors_start; |
695 | 690 | ||
696 | for (; call < (ctor_fn_t *) __ctors_end; call++) | 691 | for (; fn < (ctor_fn_t *) __ctors_end; fn++) |
697 | (*call)(); | 692 | (*fn)(); |
698 | #endif | 693 | #endif |
699 | } | 694 | } |
700 | 695 | ||
@@ -755,10 +750,10 @@ extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[]; | |||
755 | 750 | ||
756 | static void __init do_initcalls(void) | 751 | static void __init do_initcalls(void) |
757 | { | 752 | { |
758 | initcall_t *call; | 753 | initcall_t *fn; |
759 | 754 | ||
760 | for (call = __early_initcall_end; call < __initcall_end; call++) | 755 | for (fn = __early_initcall_end; fn < __initcall_end; fn++) |
761 | do_one_initcall(*call); | 756 | do_one_initcall(*fn); |
762 | 757 | ||
763 | /* Make sure there is no pending stuff from the initcall sequence */ | 758 | /* Make sure there is no pending stuff from the initcall sequence */ |
764 | flush_scheduled_work(); | 759 | flush_scheduled_work(); |
@@ -785,10 +780,10 @@ static void __init do_basic_setup(void) | |||
785 | 780 | ||
786 | static void __init do_pre_smp_initcalls(void) | 781 | static void __init do_pre_smp_initcalls(void) |
787 | { | 782 | { |
788 | initcall_t *call; | 783 | initcall_t *fn; |
789 | 784 | ||
790 | for (call = __initcall_start; call < __early_initcall_end; call++) | 785 | for (fn = __initcall_start; fn < __early_initcall_end; fn++) |
791 | do_one_initcall(*call); | 786 | do_one_initcall(*fn); |
792 | } | 787 | } |
793 | 788 | ||
794 | static void run_init_process(char *init_filename) | 789 | static void run_init_process(char *init_filename) |
diff --git a/init/version.c b/init/version.c index 52a8b98642b8..adff586401a5 100644 --- a/init/version.c +++ b/init/version.c | |||
@@ -6,11 +6,11 @@ | |||
6 | * May be freely distributed as part of Linux. | 6 | * May be freely distributed as part of Linux. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/compile.h> | 9 | #include <generated/compile.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/uts.h> | 11 | #include <linux/uts.h> |
12 | #include <linux/utsname.h> | 12 | #include <linux/utsname.h> |
13 | #include <linux/utsrelease.h> | 13 | #include <generated/utsrelease.h> |
14 | #include <linux/version.h> | 14 | #include <linux/version.h> |
15 | 15 | ||
16 | #ifndef CONFIG_KALLSYMS | 16 | #ifndef CONFIG_KALLSYMS |