arm64: kdump: Reimplement crashkernel=X
authorChen Zhou <chenzhou10@huawei.com>
Fri, 6 May 2022 11:43:59 +0000 (19:43 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Sat, 7 May 2022 18:54:33 +0000 (19:54 +0100)
commit944a45abfabc171fd121315ff0d5e62b11cb5d6f
treebceddfe1948986284e9ff090b6e695cf2e07ef4d
parente6b394425c615d1596ce7d9de23a3a34ee2e612b
arm64: kdump: Reimplement crashkernel=X

There are following issues in arm64 kdump:
1. We use crashkernel=X to reserve crashkernel in DMA zone, which
will fail when there is not enough low memory.
2. If reserving crashkernel above DMA zone, in this case, crash dump
kernel will fail to boot because there is no low memory available
for allocation.

To solve these issues, introduce crashkernel=X,[high,low].
The "crashkernel=X,high" is used to select a region above DMA zone, and
the "crashkernel=Y,low" is used to allocate specified size low memory.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Co-developed-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20220506114402.365-4-thunder.leizhen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/machine_kexec.c
arch/arm64/kernel/machine_kexec_file.c
arch/arm64/mm/init.c