Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9fbf1a5 authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky
Browse files

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: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent d7b7cdea
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <asm/ipl.h>
#include <asm/diag.h>
#include <asm/asm-offsets.h>
#include <asm/os_info.h>

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

/*