From: Pingfan Liu <piliu@xxxxxxxxxx> Signed-off-by: Pingfan Liu <piliu@xxxxxxxxxx> Cc: Jiri Bohac <jbohac@xxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Philipp Rudo <prudo@xxxxxxxxxx> Cc: Baoquan He <bhe@xxxxxxxxxx> Cc: Dave Young <dyoung@xxxxxxxxxx> To: kexec@xxxxxxxxxxxxxxxxxxx --- drivers/of/kexec.c | 14 ++++++++++++++ include/linux/kexec.h | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/drivers/of/kexec.c b/drivers/of/kexec.c index 68278340cecf..471b6cdf34ff 100644 --- a/drivers/of/kexec.c +++ b/drivers/of/kexec.c @@ -410,6 +410,20 @@ void *of_kexec_alloc_and_setup_fdt(const struct kimage *image, if (ret) goto out; } + + ret = fdt_appendprop_u64(fdt, chosen_node, + "kdump,cma_pfn", kdump_cma_pfn); + if (ret) + goto out; + ret = fdt_appendprop_u64(fdt, chosen_node, + "kdump,cma_pg_cnt", kdump_cma_pg_cnt); + if (ret) + goto out; + ret = fdt_appendprop_u64(fdt, chosen_node, + "kdump,cma_pg_paddr", kdump_cma_pg_paddr); + if (ret) + goto out; + } /* add bootargs */ diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 95e19c814c93..bf2d8b9d8c07 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -408,6 +408,10 @@ bool kexec_load_permitted(int kexec_image_type); /* flag to track if kexec reboot is in progress */ extern bool kexec_in_progress; +extern u64 kdump_cma_pfn; +extern u64 kdump_cma_pg_cnt; +extern u64 kdump_cma_pg_paddr; + int crash_shrink_memory(unsigned long new_size); ssize_t crash_get_memory_size(void); void kdump_kernel_reuse_mem(void); -- 2.31.1 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec