* in i386_start_kernel
*/
initrd_start = ramdisk_image + PAGE_OFFSET;
- initrd_end = initrd_start+ramdisk_size;
+ initrd_end = initrd_start + ramdisk_size;
return;
}
#define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT)
-static void __init relocate_initrd(void)
+static void __init post_reserve_initrd(void)
{
u64 ramdisk_image = boot_params.hdr.ramdisk_image;
u64 ramdisk_size = boot_params.hdr.ramdisk_size;
/* need to free that, otherwise init highmem will reserve it again */
free_early(ramdisk_image, ramdisk_image+ramdisk_size);
}
-
+#else
+void __init reserve_initrd(void)
+{
+}
+static void __init post_reserve_initrd(void)
+{
+}
#endif /* CONFIG_BLK_DEV_INITRD */
/*
* NOTE: at this point the bootmem allocator is fully available.
*/
-#ifdef CONFIG_BLK_DEV_INITRD
- relocate_initrd();
-#endif
+ post_reserve_initrd();
remapped_pgdat_init();
sparse_init();
}
#endif /* !CONFIG_NEED_MULTIPLE_NODES */
-extern void reserve_initrd(void);
-
void __init setup_bootmem_allocator(void)
{
int i;
if (bootmap == -1L)
panic("Cannot find bootmem map of size %ld\n", bootmap_size);
reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP");
-#ifdef CONFIG_BLK_DEV_INITRD
+
reserve_initrd();
-#endif
+
bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn);
printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
max_pfn_mapped<<PAGE_SHIFT);