From: Yinghai Lu Date: Sat, 14 Jun 2008 03:07:03 +0000 (-0700) Subject: x86: clean up relocate_initrd X-Git-Tag: firefly_0821_release~19697^2~249^2~20 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9a27f5c51629c3d3b7718dd4be3d2722b472fafe;p=firefly-linux-kernel-4.4.55.git x86: clean up relocate_initrd 1. move that before zone_sizes_init ... 2. add free_early for one old one, otherwise it will be be reserved again when we init highmem. Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 1d4be07e15e5..72b11d4557b7 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c @@ -584,6 +584,9 @@ static void __init relocate_initrd(void) printk(KERN_INFO "Copied RAMDISK from %016llx - %016llx to %08llx - %08llx\n", ramdisk_image, ramdisk_image + ramdisk_size - 1, ramdisk_here, ramdisk_here + ramdisk_size - 1); + + /* need to free that, otherwise init highmem will reserve it again */ + free_early(ramdisk_image, ramdisk_image+ramdisk_size); } #endif /* CONFIG_BLK_DEV_INITRD */ @@ -801,10 +804,6 @@ void __init setup_arch(char **cmdline_p) init_ohci1394_dma_on_all_controllers(); #endif - remapped_pgdat_init(); - sparse_init(); - zone_sizes_init(); - /* * NOTE: at this point the bootmem allocator is fully available. */ @@ -813,6 +812,10 @@ void __init setup_arch(char **cmdline_p) relocate_initrd(); #endif + remapped_pgdat_init(); + sparse_init(); + zone_sizes_init(); + paravirt_post_allocator_init(); dmi_scan_machine();