[PATCH v5 3/8] of: reserved_mem: mark /reserved-memory entries with MEMBLOCK_NODUMP
Wandun Chen
chenwandun1 at gmail.com
Thu Aug 6 02:35:14 PDT 2026
From: Wandun Chen <chenwandun at lixiang.com>
Mark non-dumpable reserved-memory regions with MEMBLOCK_NODUMP so
kdump can omit them from the vmcore.
The marking is guarded by CONFIG_CRASH_DUMP so non-kdump kernels do not
pay the cost of splitting memblock.memory entries at NODUMP boundaries.
Signed-off-by: Wandun Chen <chenwandun at lixiang.com>
Tested-by: Meijing Zhao <zhaomeijing at lixiang.com>
---
drivers/of/of_reserved_mem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 7b1616b9c6c2..f38d11df6f15 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -674,6 +674,9 @@ static void __init fdt_init_reserved_mem_node(unsigned long node, const char *un
rmem->name ? rmem->name : "unknown");
}
+ if (IS_ENABLED(CONFIG_CRASH_DUMP) && !rmem->dumpable)
+ memblock_mark_nodump(rmem->base, rmem->size);
+
reserved_mem_count++;
}
--
2.43.0
More information about the linux-arm-kernel
mailing list