Message ID | 1619058274-6996-3-git-send-email-tangyouling@loongson.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | mips: Fix related problems in kdump operation | expand |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 9338520..1bc8a9cc 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -352,8 +352,13 @@ static int __init early_parse_mem(char *p) */ if (usermem == 0) { usermem = 1; - memblock_remove(memblock_start_of_DRAM(), - memblock_end_of_DRAM() - memblock_start_of_DRAM()); + /* + * During the kdump operation, the old memory should be + * visible to the capture kernel. + */ + if (!strstr(boot_command_line, "elfcorehdr")) + memblock_remove(memblock_start_of_DRAM(), + memblock_end_of_DRAM() - memblock_start_of_DRAM()); } start = 0; size = memparse(p, &p);