Skip to content

Commit 2931ea8

Browse files
geerturobherring
authored andcommitted
riscv: Remove non-standard linux,elfcorehdr handling
RISC-V uses platform-specific code to locate the elf core header in memory. However, this does not conform to the standard "linux,elfcorehdr" DT bindings, as it relies on a reserved memory node with the "linux,elfcorehdr" compatible value, instead of on a "linux,elfcorehdr" property under the "/chosen" node. The non-compliant code can just be removed, as the standard behavior is already implemented by platform-agnostic handling in the FDT core code. Fixes: 5640975 ("RISC-V: Add crash kernel support") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Palmer Dabbelt <[email protected]> Acked-by: Palmer Dabbelt <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/41c75d6ee3114ae6304f8afe0051895af91200ee.1628670468.git.geert+renesas@glider.be
1 parent bf2e860 commit 2931ea8

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

arch/riscv/mm/init.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -829,26 +829,6 @@ static void __init reserve_crashkernel(void)
829829
}
830830
#endif /* CONFIG_KEXEC_CORE */
831831

832-
#ifdef CONFIG_CRASH_DUMP
833-
/*
834-
* We keep track of the ELF core header of the crashed
835-
* kernel with a reserved-memory region with compatible
836-
* string "linux,elfcorehdr". Here we register a callback
837-
* to populate elfcorehdr_addr/size when this region is
838-
* present. Note that this region will be marked as
839-
* reserved once we call early_init_fdt_scan_reserved_mem()
840-
* later on.
841-
*/
842-
static int __init elfcore_hdr_setup(struct reserved_mem *rmem)
843-
{
844-
elfcorehdr_addr = rmem->base;
845-
elfcorehdr_size = rmem->size;
846-
return 0;
847-
}
848-
849-
RESERVEDMEM_OF_DECLARE(elfcorehdr, "linux,elfcorehdr", elfcore_hdr_setup);
850-
#endif
851-
852832
void __init paging_init(void)
853833
{
854834
setup_bootmem();

0 commit comments

Comments
 (0)