diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-01-13 03:58:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-13 04:08:50 -0500 |
commit | 61405fea92c42d072d9b8bd189689f1502a838af (patch) | |
tree | 013ea3e7ed71f4114004d5852d40b6e89e128f76 /init | |
parent | 9c443dfdd31eddea6cbe6ee0ca469fbcc4e1dc3b (diff) | |
parent | 1703f2c321a8a531c393e137a82602e16c6061cb (diff) |
Merge branch 'perf/urgent' into perf/core
Merge reason: queue up dependent patch, update to -rc4
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 18 | ||||
-rw-r--r-- | init/Makefile | 8 | ||||
-rw-r--r-- | init/initramfs.c | 10 | ||||
-rw-r--r-- | init/main.c | 7 | ||||
-rw-r--r-- | init/version.c | 4 |
5 files changed, 25 insertions, 22 deletions
diff --git a/init/Kconfig b/init/Kconfig index 06dab27c18d9..ada48441aff8 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 |
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 c3db4a98b369..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 | } |
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 |