@@ -164,47 +164,6 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
164164 return phys ;
165165}
166166
167- static void __init arm_initrd_init (void )
168- {
169- #ifdef CONFIG_BLK_DEV_INITRD
170- phys_addr_t start ;
171- unsigned long size ;
172-
173- initrd_start = initrd_end = 0 ;
174-
175- if (!phys_initrd_size )
176- return ;
177-
178- /*
179- * Round the memory region to page boundaries as per free_initrd_mem()
180- * This allows us to detect whether the pages overlapping the initrd
181- * are in use, but more importantly, reserves the entire set of pages
182- * as we don't want these pages allocated for other purposes.
183- */
184- start = round_down (phys_initrd_start , PAGE_SIZE );
185- size = phys_initrd_size + (phys_initrd_start - start );
186- size = round_up (size , PAGE_SIZE );
187-
188- if (!memblock_is_region_memory (start , size )) {
189- pr_err ("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n" ,
190- (u64 )start , size );
191- return ;
192- }
193-
194- if (memblock_is_region_reserved (start , size )) {
195- pr_err ("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n" ,
196- (u64 )start , size );
197- return ;
198- }
199-
200- memblock_reserve (start , size );
201-
202- /* Now convert initrd to virtual addresses */
203- initrd_start = __phys_to_virt (phys_initrd_start );
204- initrd_end = initrd_start + phys_initrd_size ;
205- #endif
206- }
207-
208167#ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
209168void check_cpu_icache_size (int cpuid )
210169{
@@ -226,7 +185,7 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
226185 /* Register the kernel text, kernel data and initrd with memblock. */
227186 memblock_reserve (__pa (KERNEL_START ), KERNEL_END - KERNEL_START );
228187
229- arm_initrd_init ();
188+ reserve_initrd_mem ();
230189
231190 arm_mm_memblock_reserve ();
232191
0 commit comments