All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] MIPS: Crash kernel should be able to see old memories
@ 2020-09-23  2:30 ` Huacai Chen
  0 siblings, 0 replies; 32+ messages in thread
From: Huacai Chen @ 2020-09-23  2:30 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Eric Biederman, Dave Young, Baoquan He, Vivek Goyal
  Cc: linux-mips, kexec, Fuxin Zhang, Huacai Chen, Jiaxun Yang, Huacai Chen

Kexec-tools use mem=X@Y to pass usable memories to crash kernel, but in
commit a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") all
BIOS passed memories are removed by early_parse_mem(). I think this is
reasonable for a normal kernel but not for a crash kernel, because a
crash kernel should be able to see all old memories, even though it is
not supposed to use them.

Fixes: a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map")
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 arch/mips/kernel/setup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 4c04a86..e2804a2 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -392,8 +392,10 @@ static int __init early_parse_mem(char *p)
 	 */
 	if (usermem == 0) {
 		usermem = 1;
+#ifndef CONFIG_CRASH_DUMP
 		memblock_remove(memblock_start_of_DRAM(),
 			memblock_end_of_DRAM() - memblock_start_of_DRAM());
+#endif
 	}
 	start = 0;
 	size = memparse(p, &p);
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2020-10-05  0:40 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23  2:30 [PATCH 1/3] MIPS: Crash kernel should be able to see old memories Huacai Chen
2020-09-23  2:30 ` Huacai Chen
2020-09-23  2:30 ` [PATCH 2/3] MIPS: Reserve extra memory for crash dump Huacai Chen
2020-09-23  2:30   ` Huacai Chen
2020-09-23  2:30 ` [PATCH 3/3] MIPS: Loongson64: Add kexec/kdump support Huacai Chen
2020-09-23  2:30   ` Huacai Chen
2020-09-23  3:35   ` Jinyang He
2020-09-23  3:35     ` Jinyang He
2020-09-24  0:31     ` Huacai Chen
2020-09-24  0:31       ` Huacai Chen
2020-09-23 13:35   ` Jiaxun Yang
2020-09-23 13:35     ` Jiaxun Yang
2020-09-24  1:19     ` Huacai Chen
2020-09-24  1:19       ` Huacai Chen
2020-09-24  1:48       ` Jiaxun Yang
2020-09-24  1:48         ` Jiaxun Yang
2020-09-24  2:15       ` Jinyang He
2020-09-24  2:15         ` Jinyang He
2020-09-23  2:45 ` [PATCH 1/3] MIPS: Crash kernel should be able to see old memories Baoquan He
2020-09-23  2:45   ` Baoquan He
2020-09-23  2:58   ` Huacai Chen
2020-09-23  2:58     ` Huacai Chen
2020-09-23  3:08     ` Baoquan He
2020-09-23  3:08       ` Baoquan He
2020-10-03 21:07       ` Maciej W. Rozycki
2020-10-03 21:07         ` Maciej W. Rozycki
2020-10-05  0:40         ` Maciej W. Rozycki
2020-10-05  0:40           ` Maciej W. Rozycki
2020-09-23  3:02 ` Jinyang He
2020-09-23  3:02   ` Jinyang He
2020-09-23  3:13   ` Huacai Chen
2020-09-23  3:13     ` Huacai Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.