diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 25 | ||||
-rw-r--r-- | init/Makefile | 8 | ||||
-rw-r--r-- | init/calibrate.c | 24 | ||||
-rw-r--r-- | init/main.c | 18 | ||||
-rw-r--r-- | init/version.c | 4 |
5 files changed, 52 insertions, 27 deletions
diff --git a/init/Kconfig b/init/Kconfig index 9ee778294756..a23da9f01803 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -615,7 +615,7 @@ config SYSFS_DEPRECATED | |||
615 | bool | 615 | bool |
616 | 616 | ||
617 | config SYSFS_DEPRECATED_V2 | 617 | config SYSFS_DEPRECATED_V2 |
618 | bool "enable deprecated sysfs features which may confuse old userspace tools" | 618 | bool "enable deprecated sysfs features to support old userspace tools" |
619 | depends on SYSFS | 619 | depends on SYSFS |
620 | default n | 620 | default n |
621 | select SYSFS_DEPRECATED | 621 | select SYSFS_DEPRECATED |
@@ -763,6 +763,7 @@ config UID16 | |||
763 | 763 | ||
764 | config SYSCTL_SYSCALL | 764 | config SYSCTL_SYSCALL |
765 | bool "Sysctl syscall support" if EMBEDDED | 765 | bool "Sysctl syscall support" if EMBEDDED |
766 | depends on PROC_SYSCTL | ||
766 | default y | 767 | default y |
767 | select SYSCTL | 768 | select SYSCTL |
768 | ---help--- | 769 | ---help--- |
@@ -1078,6 +1079,28 @@ config SLOB | |||
1078 | 1079 | ||
1079 | endchoice | 1080 | endchoice |
1080 | 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 | |||
1081 | config PROFILING | 1104 | config PROFILING |
1082 | bool "Profiling support (EXPERIMENTAL)" | 1105 | bool "Profiling support (EXPERIMENTAL)" |
1083 | 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/calibrate.c b/init/calibrate.c index a379c9061199..6eb48e53d61c 100644 --- a/init/calibrate.c +++ b/init/calibrate.c | |||
@@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void) | |||
123 | { | 123 | { |
124 | unsigned long ticks, loopbit; | 124 | unsigned long ticks, loopbit; |
125 | int lps_precision = LPS_PREC; | 125 | int lps_precision = LPS_PREC; |
126 | static bool printed; | ||
126 | 127 | ||
127 | if (preset_lpj) { | 128 | if (preset_lpj) { |
128 | loops_per_jiffy = preset_lpj; | 129 | loops_per_jiffy = preset_lpj; |
129 | printk(KERN_INFO | 130 | if (!printed) |
130 | "Calibrating delay loop (skipped) preset value.. "); | 131 | pr_info("Calibrating delay loop (skipped) " |
131 | } else if ((smp_processor_id() == 0) && lpj_fine) { | 132 | "preset value.. "); |
133 | } else if ((!printed) && lpj_fine) { | ||
132 | loops_per_jiffy = lpj_fine; | 134 | loops_per_jiffy = lpj_fine; |
133 | printk(KERN_INFO | 135 | pr_info("Calibrating delay loop (skipped), " |
134 | "Calibrating delay loop (skipped), " | ||
135 | "value calculated using timer frequency.. "); | 136 | "value calculated using timer frequency.. "); |
136 | } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { | 137 | } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { |
137 | printk(KERN_INFO | 138 | if (!printed) |
138 | "Calibrating delay using timer specific routine.. "); | 139 | pr_info("Calibrating delay using timer " |
140 | "specific routine.. "); | ||
139 | } else { | 141 | } else { |
140 | loops_per_jiffy = (1<<12); | 142 | loops_per_jiffy = (1<<12); |
141 | 143 | ||
142 | printk(KERN_INFO "Calibrating delay loop... "); | 144 | if (!printed) |
145 | pr_info("Calibrating delay loop... "); | ||
143 | while ((loops_per_jiffy <<= 1) != 0) { | 146 | while ((loops_per_jiffy <<= 1) != 0) { |
144 | /* wait for "start of" clock tick */ | 147 | /* wait for "start of" clock tick */ |
145 | ticks = jiffies; | 148 | ticks = jiffies; |
@@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void) | |||
170 | loops_per_jiffy &= ~loopbit; | 173 | loops_per_jiffy &= ~loopbit; |
171 | } | 174 | } |
172 | } | 175 | } |
173 | printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n", | 176 | if (!printed) |
177 | pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", | ||
174 | loops_per_jiffy/(500000/HZ), | 178 | loops_per_jiffy/(500000/HZ), |
175 | (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); | 179 | (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); |
180 | |||
181 | printed = true; | ||
176 | } | 182 | } |
diff --git a/init/main.c b/init/main.c index 4051d75dd2d6..c3db4a98b369 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -691,10 +691,10 @@ asmlinkage void __init start_kernel(void) | |||
691 | static void __init do_ctors(void) | 691 | static void __init do_ctors(void) |
692 | { | 692 | { |
693 | #ifdef CONFIG_CONSTRUCTORS | 693 | #ifdef CONFIG_CONSTRUCTORS |
694 | ctor_fn_t *call = (ctor_fn_t *) __ctors_start; | 694 | ctor_fn_t *fn = (ctor_fn_t *) __ctors_start; |
695 | 695 | ||
696 | for (; call < (ctor_fn_t *) __ctors_end; call++) | 696 | for (; fn < (ctor_fn_t *) __ctors_end; fn++) |
697 | (*call)(); | 697 | (*fn)(); |
698 | #endif | 698 | #endif |
699 | } | 699 | } |
700 | 700 | ||
@@ -755,10 +755,10 @@ extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[]; | |||
755 | 755 | ||
756 | static void __init do_initcalls(void) | 756 | static void __init do_initcalls(void) |
757 | { | 757 | { |
758 | initcall_t *call; | 758 | initcall_t *fn; |
759 | 759 | ||
760 | for (call = __early_initcall_end; call < __initcall_end; call++) | 760 | for (fn = __early_initcall_end; fn < __initcall_end; fn++) |
761 | do_one_initcall(*call); | 761 | do_one_initcall(*fn); |
762 | 762 | ||
763 | /* Make sure there is no pending stuff from the initcall sequence */ | 763 | /* Make sure there is no pending stuff from the initcall sequence */ |
764 | flush_scheduled_work(); | 764 | flush_scheduled_work(); |
@@ -785,10 +785,10 @@ static void __init do_basic_setup(void) | |||
785 | 785 | ||
786 | static void __init do_pre_smp_initcalls(void) | 786 | static void __init do_pre_smp_initcalls(void) |
787 | { | 787 | { |
788 | initcall_t *call; | 788 | initcall_t *fn; |
789 | 789 | ||
790 | for (call = __initcall_start; call < __early_initcall_end; call++) | 790 | for (fn = __initcall_start; fn < __early_initcall_end; fn++) |
791 | do_one_initcall(*call); | 791 | do_one_initcall(*fn); |
792 | } | 792 | } |
793 | 793 | ||
794 | static void run_init_process(char *init_filename) | 794 | 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 |