lkml.org 
[lkml]   [2014]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 1/2] kdump: add sparse memory related values to vmcore
Date
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.liu@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


\
 
 \ /
  Last update: 2014-05-07 17:21    [W:0.077 / U:2.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site