[PATCH makedumpfile V2 2/2] riscv64: Correct the pfn_start for flatmem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux