of: Support more than one crash kernel regions for kexec -s
authorZhen Lei <thunder.leizhen@huawei.com>
Fri, 6 May 2022 11:44:01 +0000 (19:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:36 +0000 (10:22 +0200)
commitdb6d83e09f760531bb57a31fb1e80f0d5b6a68e2
tree4c7c5fa936361684ccf6e695323c356f191d878b
parent22e0b0b84c538b60bdf8eeceee7ab3cebf4a1a09
of: Support more than one crash kernel regions for kexec -s

[ Upstream commit 8af6b91f58341325bf74ecb0389ddc0039091d84 ]

When "crashkernel=X,high" is used, there may be two crash regions:
high=crashk_res and low=crashk_low_res. But now the syscall
kexec_file_load() only add crashk_res into "linux,usable-memory-range",
this may cause the second kernel to have no available dma memory.

Fix it like kexec-tools does for option -c, add both 'high' and 'low'
regions into the dtb.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Baoquan He <bhe@redhat.com>
Link: https://lore.kernel.org/r/20220506114402.365-6-thunder.leizhen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/of/kexec.c