From: Michael Holzheu Date: Fri, 18 May 2012 13:10:05 +0000 (+0200) Subject: s390/kdump: Account /sys/kernel/kexec_crash_size changes in OS info X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a9fbf1a53836d4105f95df947ac00e22311dff33;p=linux-beck.git s390/kdump: Account /sys/kernel/kexec_crash_size changes in OS info The crashkernel size for kdump can be reduced at runtime with the sysfs file "/sys/kernel/kexec_crash_size". Currently those changes do not update the OS info crashkernel information that is used for stand-alone kdump. With this fix now also the OS info crashkernel information is updated correctly. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index bdad47d54478..03d2027d656a 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -24,6 +24,7 @@ #include #include #include +#include typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long); @@ -114,8 +115,13 @@ static void crash_map_pages(int enable) size % KEXEC_CRASH_MEM_ALIGN); if (enable) vmem_add_mapping(crashk_res.start, size); - else + else { vmem_remove_mapping(crashk_res.start, size); + if (size) + os_info_crashkernel_add(crashk_res.start, size); + else + os_info_crashkernel_add(0, 0); + } } /*