aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-01-16 10:11:10 -0500
committerRussell King <rmk+kernel@armlinux.org.uk>2017-02-28 06:06:20 -0500
commit3928624812dcfa39b6a67f9de46efcb51c573ad0 (patch)
tree5ed8425b0bfea73891d1bdd531abd14a2e7f38ab
parente2fce0a28d8f4293d68abf6485956e7794a30124 (diff)
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: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/mm/init.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 50e5402a8ef3..43d8825e59bb 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -228,11 +228,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
228 return phys; 228 return phys;
229} 229}
230 230
231void __init arm_memblock_init(const struct machine_desc *mdesc) 231static void __init arm_initrd_init(void)
232{ 232{
233 /* Register the kernel text, kernel data and initrd with memblock. */
234 memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
235
236#ifdef CONFIG_BLK_DEV_INITRD 233#ifdef CONFIG_BLK_DEV_INITRD
237 /* FDT scan will populate initrd_start */ 234 /* FDT scan will populate initrd_start */
238 if (initrd_start && !phys_initrd_size) { 235 if (initrd_start && !phys_initrd_size) {
@@ -260,6 +257,14 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
260 initrd_end = initrd_start + phys_initrd_size; 257 initrd_end = initrd_start + phys_initrd_size;
261 } 258 }
262#endif 259#endif
260}
261
262void __init arm_memblock_init(const struct machine_desc *mdesc)
263{
264 /* Register the kernel text, kernel data and initrd with memblock. */
265 memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
266
267 arm_initrd_init();
263 268
264 arm_mm_memblock_reserve(); 269 arm_mm_memblock_reserve();
265 270