Commit 39286248 authored by Russell King's avatar Russell King

ARM: mm: move initrd init code out of arm_memblock_init()

Move the ARM initrd initialisation code out of arm_memblock_init() into
its own function, so it can be cleaned up.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent e2fce0a2
...@@ -228,11 +228,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) ...@@ -228,11 +228,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
return phys; return phys;
} }
void __init arm_memblock_init(const struct machine_desc *mdesc) static void __init arm_initrd_init(void)
{ {
/* Register the kernel text, kernel data and initrd with memblock. */
memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
/* FDT scan will populate initrd_start */ /* FDT scan will populate initrd_start */
if (initrd_start && !phys_initrd_size) { if (initrd_start && !phys_initrd_size) {
...@@ -260,6 +257,14 @@ void __init arm_memblock_init(const struct machine_desc *mdesc) ...@@ -260,6 +257,14 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
initrd_end = initrd_start + phys_initrd_size; initrd_end = initrd_start + phys_initrd_size;
} }
#endif #endif
}
void __init arm_memblock_init(const struct machine_desc *mdesc)
{
/* Register the kernel text, kernel data and initrd with memblock. */
memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
arm_initrd_init();
arm_mm_memblock_reserve(); arm_mm_memblock_reserve();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment