diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-02-28 12:25:22 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-02-28 12:25:22 -0500 |
commit | 9585da3729e7e27bf22818625c10ac6c64ebb609 (patch) | |
tree | 8c8d46f7f2cc933fdf75a6a75cf593a63f7b8717 /init | |
parent | 8080d5497146d5d27d9e8e78229d1adc7fe280cf (diff) | |
parent | 6749c5507388f3fc3719f57a54b540ee83f6661a (diff) |
Merge branch 'master' of git+ssh://galak@master.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'init')
-rw-r--r-- | init/initramfs.c | 24 | ||||
-rw-r--r-- | init/main.c | 1 |
2 files changed, 23 insertions, 2 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 0c5d9a3f95..637344b059 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -466,10 +466,32 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) | |||
466 | extern char __initramfs_start[], __initramfs_end[]; | 466 | extern char __initramfs_start[], __initramfs_end[]; |
467 | #ifdef CONFIG_BLK_DEV_INITRD | 467 | #ifdef CONFIG_BLK_DEV_INITRD |
468 | #include <linux/initrd.h> | 468 | #include <linux/initrd.h> |
469 | #include <linux/kexec.h> | ||
469 | 470 | ||
470 | static void __init free_initrd(void) | 471 | static void __init free_initrd(void) |
471 | { | 472 | { |
472 | free_initrd_mem(initrd_start, initrd_end); | 473 | #ifdef CONFIG_KEXEC |
474 | unsigned long crashk_start = (unsigned long)__va(crashk_res.start); | ||
475 | unsigned long crashk_end = (unsigned long)__va(crashk_res.end); | ||
476 | |||
477 | /* | ||
478 | * If the initrd region is overlapped with crashkernel reserved region, | ||
479 | * free only memory that is not part of crashkernel region. | ||
480 | */ | ||
481 | if (initrd_start < crashk_end && initrd_end > crashk_start) { | ||
482 | /* | ||
483 | * Initialize initrd memory region since the kexec boot does | ||
484 | * not do. | ||
485 | */ | ||
486 | memset((void *)initrd_start, 0, initrd_end - initrd_start); | ||
487 | if (initrd_start < crashk_start) | ||
488 | free_initrd_mem(initrd_start, crashk_start); | ||
489 | if (initrd_end > crashk_end) | ||
490 | free_initrd_mem(crashk_end, initrd_end); | ||
491 | } else | ||
492 | #endif | ||
493 | free_initrd_mem(initrd_start, initrd_end); | ||
494 | |||
473 | initrd_start = 0; | 495 | initrd_start = 0; |
474 | initrd_end = 0; | 496 | initrd_end = 0; |
475 | } | 497 | } |
diff --git a/init/main.c b/init/main.c index 7c79da57d3..4c194c4739 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -668,7 +668,6 @@ static int init(void * unused) | |||
668 | */ | 668 | */ |
669 | child_reaper = current; | 669 | child_reaper = current; |
670 | 670 | ||
671 | /* Sets up cpus_possible() */ | ||
672 | smp_prepare_cpus(max_cpus); | 671 | smp_prepare_cpus(max_cpus); |
673 | 672 | ||
674 | do_pre_smp_initcalls(); | 673 | do_pre_smp_initcalls(); |