@@ -164,47 +164,6 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
164
164
return phys ;
165
165
}
166
166
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
-
208
167
#ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
209
168
void check_cpu_icache_size (int cpuid )
210
169
{
@@ -226,7 +185,7 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
226
185
/* Register the kernel text, kernel data and initrd with memblock. */
227
186
memblock_reserve (__pa (KERNEL_START ), KERNEL_END - KERNEL_START );
228
187
229
- arm_initrd_init ();
188
+ reserve_initrd_mem ();
230
189
231
190
arm_mm_memblock_reserve ();
232
191
0 commit comments