kexec: enable kexec_crash_size to support two crash kernel regions
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 27 May 2023 12:34:39 +0000 (20:34 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 10 Jun 2023 00:44:24 +0000 (17:44 -0700)
commit16c6006af4d4e70ecef93977a5314409d931020b
tree4182c557fd6206930f5c58f328d56dc124bd67d4
parent5b7bfb32cbaad6ba997ab4295ee50bc9921252f2
kexec: enable kexec_crash_size to support two crash kernel regions

The crashk_low_res should be considered by /sys/kernel/kexec_crash_size
to support two crash kernel regions shrinking if existing.

While doing it, crashk_low_res will only be shrunk when the entire
crashk_res is empty; and if the crashk_res is empty and crahk_low_res
is not, change crashk_low_res to be crashk_res.

[bhe@redhat.com: redo changelog]
Link: https://lkml.kernel.org/r/20230527123439.772-7-thunder.leizhen@huawei.com
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/kexec_core.c