To let info->max_mapnr indicate the direct max PFN and then make the kdump header's max_mapnr_64 correct, riscv64 port didn't define ARCH_PFN_OFFSET. As for FLATMEM type, the pfn region of mem_map_data should be adjusted to start from info->phys_base instead of zero. Signed-off-by: Song Shuai <songshuaishuai@xxxxxxxxxxx> --- makedumpfile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makedumpfile.c b/makedumpfile.c index 42d5565..3705bdd 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -3302,7 +3302,11 @@ get_mm_flatmem(void) if (is_xen_memory()) dump_mem_map(0, info->dom0_mapnr, mem_map, 0); else +#ifdef __riscv64__ + dump_mem_map((info->phys_base >> PAGESHIFT()), info->max_mapnr, mem_map, 0); +#else dump_mem_map(0, info->max_mapnr, mem_map, 0); +#endif return TRUE; } -- 2.20.1 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec