diff options
author | Aditya Gupta <adityag@linux.ibm.com> | 2023-09-11 12:14:09 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-09-18 05:23:27 +0300 |
commit | 7135b921b32966d7602ede396b7286d372aee63f (patch) | |
tree | 0d1e2cd41dbd571d089f56b3264e09c8bcce3441 /arch/powerpc | |
parent | f84b727d132c39c70208503e60149af6dd5a217f (diff) | |
download | linux-7135b921b32966d7602ede396b7286d372aee63f.tar.xz |
powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
Presently, while reading a vmcore, makedumpfile uses
`cur_cpu_spec.mmu_features` to decide whether the crashed system had
RADIX MMU or not.
Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
a vmlinux is passed with the `-x` flag to makedumpfile), and hence
assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
MMU to be hash MMU.
Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
`cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
is accessible to makedumpfile, without needing the vmlinux file
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230911091409.415662-1-adityag@linux.ibm.com
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kexec/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c index de64c7962991..369b8334a4f0 100644 --- a/arch/powerpc/kexec/core.c +++ b/arch/powerpc/kexec/core.c @@ -63,6 +63,8 @@ void arch_crash_save_vmcoreinfo(void) #ifndef CONFIG_NUMA VMCOREINFO_SYMBOL(contig_page_data); #endif + VMCOREINFO_SYMBOL(cur_cpu_spec); + VMCOREINFO_OFFSET(cpu_spec, mmu_features); #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) VMCOREINFO_SYMBOL(vmemmap_list); VMCOREINFO_SYMBOL(mmu_vmemmap_psize); |