diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 40 | ||||
-rw-r--r-- | init/Makefile | 8 | ||||
-rw-r--r-- | init/initramfs.c | 10 | ||||
-rw-r--r-- | init/main.c | 25 | ||||
-rw-r--r-- | init/version.c | 4 |
5 files changed, 56 insertions, 31 deletions
diff --git a/init/Kconfig b/init/Kconfig index 54c655ce9c04..d95ca7cd5d45 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -115,10 +115,13 @@ config HAVE_KERNEL_BZIP2 | |||
115 | config HAVE_KERNEL_LZMA | 115 | config HAVE_KERNEL_LZMA |
116 | bool | 116 | bool |
117 | 117 | ||
118 | config HAVE_KERNEL_LZO | ||
119 | bool | ||
120 | |||
118 | choice | 121 | choice |
119 | prompt "Kernel compression mode" | 122 | prompt "Kernel compression mode" |
120 | default KERNEL_GZIP | 123 | default KERNEL_GZIP |
121 | depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA | 124 | depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_LZO |
122 | help | 125 | help |
123 | The linux kernel is a kind of self-extracting executable. | 126 | The linux kernel is a kind of self-extracting executable. |
124 | Several compression algorithms are available, which differ | 127 | Several compression algorithms are available, which differ |
@@ -141,9 +144,8 @@ config KERNEL_GZIP | |||
141 | bool "Gzip" | 144 | bool "Gzip" |
142 | depends on HAVE_KERNEL_GZIP | 145 | depends on HAVE_KERNEL_GZIP |
143 | help | 146 | help |
144 | The old and tried gzip compression. Its compression ratio is | 147 | The old and tried gzip compression. It provides a good balance |
145 | the poorest among the 3 choices; however its speed (both | 148 | between compression ratio and decompression speed. |
146 | compression and decompression) is the fastest. | ||
147 | 149 | ||
148 | config KERNEL_BZIP2 | 150 | config KERNEL_BZIP2 |
149 | bool "Bzip2" | 151 | bool "Bzip2" |
@@ -164,6 +166,14 @@ config KERNEL_LZMA | |||
164 | two. Compression is slowest. The kernel size is about 33% | 166 | two. Compression is slowest. The kernel size is about 33% |
165 | smaller with LZMA in comparison to gzip. | 167 | smaller with LZMA in comparison to gzip. |
166 | 168 | ||
169 | config KERNEL_LZO | ||
170 | bool "LZO" | ||
171 | depends on HAVE_KERNEL_LZO | ||
172 | help | ||
173 | Its compression ratio is the poorest among the 4. The kernel | ||
174 | size is about about 10% bigger than gzip; however its speed | ||
175 | (both compression and decompression) is the fastest. | ||
176 | |||
167 | endchoice | 177 | endchoice |
168 | 178 | ||
169 | config SWAP | 179 | config SWAP |
@@ -1079,6 +1089,28 @@ config SLOB | |||
1079 | 1089 | ||
1080 | endchoice | 1090 | endchoice |
1081 | 1091 | ||
1092 | config MMAP_ALLOW_UNINITIALIZED | ||
1093 | bool "Allow mmapped anonymous memory to be uninitialized" | ||
1094 | depends on EMBEDDED && !MMU | ||
1095 | default n | ||
1096 | help | ||
1097 | Normally, and according to the Linux spec, anonymous memory obtained | ||
1098 | from mmap() has it's contents cleared before it is passed to | ||
1099 | userspace. Enabling this config option allows you to request that | ||
1100 | mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus | ||
1101 | providing a huge performance boost. If this option is not enabled, | ||
1102 | then the flag will be ignored. | ||
1103 | |||
1104 | This is taken advantage of by uClibc's malloc(), and also by | ||
1105 | ELF-FDPIC binfmt's brk and stack allocator. | ||
1106 | |||
1107 | Because of the obvious security issues, this option should only be | ||
1108 | enabled on embedded devices where you control what is run in | ||
1109 | userspace. Since that isn't generally a problem on no-MMU systems, | ||
1110 | it is normally safe to say Y here. | ||
1111 | |||
1112 | See Documentation/nommu-mmap.txt for more information. | ||
1113 | |||
1082 | config PROFILING | 1114 | config PROFILING |
1083 | bool "Profiling support (EXPERIMENTAL)" | 1115 | bool "Profiling support (EXPERIMENTAL)" |
1084 | help | 1116 | 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/initramfs.c b/init/initramfs.c index 4c00edc59689..b37d34beb90b 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -413,7 +413,7 @@ static unsigned my_inptr; /* index of next byte to be processed in inbuf */ | |||
413 | 413 | ||
414 | static char * __init unpack_to_rootfs(char *buf, unsigned len) | 414 | static char * __init unpack_to_rootfs(char *buf, unsigned len) |
415 | { | 415 | { |
416 | int written; | 416 | int written, res; |
417 | decompress_fn decompress; | 417 | decompress_fn decompress; |
418 | const char *compress_name; | 418 | const char *compress_name; |
419 | static __initdata char msg_buf[64]; | 419 | static __initdata char msg_buf[64]; |
@@ -445,10 +445,12 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len) | |||
445 | } | 445 | } |
446 | this_header = 0; | 446 | this_header = 0; |
447 | decompress = decompress_method(buf, len, &compress_name); | 447 | decompress = decompress_method(buf, len, &compress_name); |
448 | if (decompress) | 448 | if (decompress) { |
449 | decompress(buf, len, NULL, flush_buffer, NULL, | 449 | res = decompress(buf, len, NULL, flush_buffer, NULL, |
450 | &my_inptr, error); | 450 | &my_inptr, error); |
451 | else if (compress_name) { | 451 | if (res) |
452 | error("decompressor failed"); | ||
453 | } else if (compress_name) { | ||
452 | if (!message) { | 454 | if (!message) { |
453 | snprintf(msg_buf, sizeof msg_buf, | 455 | snprintf(msg_buf, sizeof msg_buf, |
454 | "compression method %s not configured", | 456 | "compression method %s not configured", |
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 |