Skip to content

Commit

Permalink
x86: clean up relocate_initrd
Browse files Browse the repository at this point in the history
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 <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent cc1050b commit 9a27f5c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions arch/x86/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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();
Expand Down

0 comments on commit 9a27f5c

Please sign in to comment.