Now different platforms may have different sparse memory related values, such as MAX_PHYSMEM_SIZE and SECTION_SIZE_BITS.
And user tools such as makedumpfile can not get these values from the vmcore. It defines these value as macros. If we use makedumpfile to treate with vmcores with different SECTION size. We must recompile it. It is awaste of time. So this patch add related values to vmcore to notify the user space tools to deal with this situation. Signed-off-by: Liu Hua <sdu....@huawei.com> --- kernel/kexec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/kexec.c b/kernel/kexec.c index bf0b929e..96f7c5b 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1577,6 +1577,9 @@ static int __init crash_save_vmcoreinfo_init(void) VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS); VMCOREINFO_STRUCT_SIZE(mem_section); VMCOREINFO_OFFSET(mem_section, section_mem_map); + VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS); + VMCOREINFO_NUMBER(SECTION_SIZE_BITS); + #endif VMCOREINFO_STRUCT_SIZE(page); VMCOREINFO_STRUCT_SIZE(pglist_data); -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/