On Fri, 2013-11-15 at 23:01 +0530, Hari Bathini wrote: > When CONFIG_SPARSEMEM_VMEMMAP option is used in kernel, makedumpfile fails > to filter vmcore dump as it fails to do vmemmap translations. So far > dump filtering on ppc64 never had to deal with vmemmap addresses seperately > as vmemmap regions where mapped in zone normal. But with the inclusion of > CONFIG_SPARSEMEM_VMEMMAP config option in kernel, this vmemmap address > translation support becomes necessary for dump filtering. For vmemmap adress > translation, few kernel symbols are needed by dump filtering tool. This patch > adds those symbols to vmcoreinfo, which a dump filtering tool can use for > filtering the kernel dump. Tested this changes successfully with makedumpfile > tool that supports vmemmap to physical address translation outside zone > normal. > > Signed-off-by: Hari Bathini <hbath...@linux.vnet.ibm.com> > --- > arch/powerpc/include/asm/pgalloc-64.h | 4 ++++ > arch/powerpc/kernel/machine_kexec.c | 12 ++++++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/arch/powerpc/include/asm/pgalloc-64.h > b/arch/powerpc/include/asm/pgalloc-64.h > index f65e27b..33e507a 100644 > --- a/arch/powerpc/include/asm/pgalloc-64.h > +++ b/arch/powerpc/include/asm/pgalloc-64.h > @@ -17,6 +17,10 @@ struct vmemmap_backing { > unsigned long virt_addr; > }; > > +#ifdef CONFIG_SPARSEMEM_VMEMMAP > +extern struct vmemmap_backing *vmemmap_list; > +#endif /* CONFIG_SPARSEMEM_VMEMMAP */
In general you don't need #ifdefs around externs, they just add noise. The exception is when the type you're using isn't defined, but that isn't the case here AFAICS. cheers _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev