@@ -124,57 +124,6 @@ static void __init reserve_crashkernel(void)
124
124
}
125
125
#endif /* CONFIG_KEXEC_CORE */
126
126
127
- #ifdef CONFIG_CRASH_DUMP
128
- static int __init early_init_dt_scan_elfcorehdr (unsigned long node ,
129
- const char * uname , int depth , void * data )
130
- {
131
- const __be32 * reg ;
132
- int len ;
133
-
134
- if (depth != 1 || strcmp (uname , "chosen" ) != 0 )
135
- return 0 ;
136
-
137
- reg = of_get_flat_dt_prop (node , "linux,elfcorehdr" , & len );
138
- if (!reg || (len < (dt_root_addr_cells + dt_root_size_cells )))
139
- return 1 ;
140
-
141
- elfcorehdr_addr = dt_mem_next_cell (dt_root_addr_cells , & reg );
142
- elfcorehdr_size = dt_mem_next_cell (dt_root_size_cells , & reg );
143
-
144
- return 1 ;
145
- }
146
-
147
- /*
148
- * reserve_elfcorehdr() - reserves memory for elf core header
149
- *
150
- * This function reserves the memory occupied by an elf core header
151
- * described in the device tree. This region contains all the
152
- * information about primary kernel's core image and is used by a dump
153
- * capture kernel to access the system memory on primary kernel.
154
- */
155
- static void __init reserve_elfcorehdr (void )
156
- {
157
- of_scan_flat_dt (early_init_dt_scan_elfcorehdr , NULL );
158
-
159
- if (!elfcorehdr_size )
160
- return ;
161
-
162
- if (memblock_is_region_reserved (elfcorehdr_addr , elfcorehdr_size )) {
163
- pr_warn ("elfcorehdr is overlapped\n" );
164
- return ;
165
- }
166
-
167
- memblock_reserve (elfcorehdr_addr , elfcorehdr_size );
168
-
169
- pr_info ("Reserving %lldKB of memory at 0x%llx for elfcorehdr\n" ,
170
- elfcorehdr_size >> 10 , elfcorehdr_addr );
171
- }
172
- #else
173
- static void __init reserve_elfcorehdr (void )
174
- {
175
- }
176
- #endif /* CONFIG_CRASH_DUMP */
177
-
178
127
/*
179
128
* Return the maximum physical address for a zone accessible by the given bits
180
129
* limit. If DRAM starts above 32-bit, expand the zone to the maximum
@@ -395,8 +344,6 @@ void __init arm64_memblock_init(void)
395
344
396
345
early_init_fdt_scan_reserved_mem ();
397
346
398
- reserve_elfcorehdr ();
399
-
400
347
high_memory = __va (memblock_end_of_DRAM () - 1 ) + 1 ;
401
348
}
402
349
0 commit comments