riscv: Export va_kernel_pa_offset in vmcoreinfo
Subsystems (4)
PATCH 1/2 riscv: Export va_kernel_pa_offset in vmcoreinfo
Since RISC-V Linux v6.4, the commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping") changes phys_ram_base from the physical start of the kernel to the actual start of the DRAM.
The Crash-utility's VTOP() still uses phys_ram_base and kernel_map.virt_addr to translate kernel virtual address, that failed the Crash with Linux v6.4 [1].
Export kernel_map.va_kernel_pa_offset in vmcoreinfo to help Crash translate the kernel virtual address correctly.
Fixes 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping")
Signed-off-by Song Shuai <[email protected]>
--- arch/riscv/kernel/crash_core.c | 2 ++ 1 file changed, 2 insertions(+)
arch/riscv/kernel/crash_core.c +2 -0
@@ -18,4 +18,6 @@ void arch_crash_save_vmcoreinfo(void)vmcoreinfo_append_str ("NUMBER(MODULES_END)=0x%lx\n" ,MODULES_END );#endif vmcoreinfo_append_str ("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n" ,KERNEL_LINK_ADDR ); +vmcoreinfo_append_str ("NUMBER(va_kernel_pa_offset)=0x%lx\n" , + kernel_map.va_kernel_pa_offset); }
Signature · 7 lines
2.20.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec