linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
@ 2023-09-11  9:14 Aditya Gupta
  2023-09-13 12:49 ` Sachin Sant
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Aditya Gupta @ 2023-09-11  9:14 UTC (permalink / raw)
  To: linuxppc-dev, mpe
  Cc: Sourabh Jain, Mahesh J Salgaonkar, Hari Bathini, Aneesh Kumar K.V

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>
---
 arch/powerpc/kexec/core.c | 2 ++
 1 file changed, 2 insertions(+)

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);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-09-22  8:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11  9:14 [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo Aditya Gupta
2023-09-13 12:49 ` Sachin Sant
2023-09-14  6:17   ` Aditya Gupta
2023-09-14 13:22   ` Michael Ellerman
2023-09-14 14:37     ` Sachin Sant
2023-09-15  1:16       ` Michael Ellerman
2023-09-19  9:17         ` Aditya Gupta
2023-09-14 13:22 ` Michael Ellerman
2023-09-15  6:15   ` Hari Bathini
2023-09-19  9:29   ` Aditya Gupta
2023-09-19 10:07     ` Michael Ellerman
2023-09-20 10:57       ` Aditya Gupta
2023-09-21  9:30 ` Michael Ellerman
2023-09-22  8:24   ` Aditya Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).