diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-05-31 09:13:59 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-06-13 15:58:19 +0200 |
commit | 2d0af2247906cf17cd641cdb16444a8f291cd4f4 (patch) | |
tree | 472403b104b87988442dd65ea60e26139d7b5f7e /arch | |
parent | 0ccb32c983e0fe79d408e50ec1386aaf78c9a7ed (diff) | |
download | op-kernel-dev-2d0af2247906cf17cd641cdb16444a8f291cd4f4.zip op-kernel-dev-2d0af2247906cf17cd641cdb16444a8f291cd4f4.tar.gz |
s390/kexec: fix update of os_info crash kernel size
Implement an s390 version of the weak crash_free_reserved_phys_range
function. This allows us to update the size of the reserved crash
kernel memory if it will be resized.
This was previously done with a call to crash_unmap_reserved_pages
from crash_shrink_memory which was removed with ("s390/kexec:
consolidate crash_map/unmap_reserved_pages() and
arch_kexec_protect(unprotect)_crashkres()")
Fixes: 7a0058ec7860 ("s390/kexec: consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 0e64f08..078d38c 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -150,6 +150,19 @@ static int kdump_csum_valid(struct kimage *image) #ifdef CONFIG_CRASH_DUMP +void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) +{ + unsigned long addr, size; + + for (addr = begin; addr < end; addr += PAGE_SIZE) + free_reserved_page(pfn_to_page(addr >> PAGE_SHIFT)); + size = begin - crashk_res.start; + if (size) + os_info_crashkernel_add(crashk_res.start, size); + else + os_info_crashkernel_add(0, 0); +} + /* * Map or unmap crashkernel memory */ @@ -161,13 +174,8 @@ 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); - } } /* |