Skip to content

Commit 57beb9b

Browse files
geerturobherring
authored andcommitted
arm64: kdump: Remove custom linux,elfcorehdr handling
Remove the architecture-specific code for handling the "linux,elfcorehdr" property under the "/chosen" node in DT, as the platform-agnostic handling in the FDT core code already takes care of this. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/3b8f801f9b92066855e87f3079fafc153ab20f69.1628670468.git.geert+renesas@glider.be
1 parent 2931ea8 commit 57beb9b

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

arch/arm64/mm/init.c

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -124,57 +124,6 @@ static void __init reserve_crashkernel(void)
124124
}
125125
#endif /* CONFIG_KEXEC_CORE */
126126

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-
178127
/*
179128
* Return the maximum physical address for a zone accessible by the given bits
180129
* limit. If DRAM starts above 32-bit, expand the zone to the maximum
@@ -395,8 +344,6 @@ void __init arm64_memblock_init(void)
395344

396345
early_init_fdt_scan_reserved_mem();
397346

398-
reserve_elfcorehdr();
399-
400347
high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
401348
}
402349

0 commit comments

Comments
 (0)