Commit d7664e7b authored by Hari Bathini's avatar Hari Bathini Committed by Kleber Sacilotto de Souza

powerpc/kdump: Handle crashkernel memory reservation failure

BugLink: https://bugs.launchpad.net/bugs/1798770

[ Upstream commit 8950329c ]

Memory reservation for crashkernel could fail if there are holes around
kdump kernel offset (128M). Fail gracefully in such cases and print an
error message.
Signed-off-by: default avatarHari Bathini <hbathini@linux.ibm.com>
Tested-by: default avatarDavid Gibson <dgibson@redhat.com>
Reviewed-by: default avatarDave Young <dyoung@redhat.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 61c83eb7
......@@ -186,7 +186,12 @@ void __init reserve_crashkernel(void)
(unsigned long)(crashk_res.start >> 20),
(unsigned long)(memblock_phys_mem_size() >> 20));
memblock_reserve(crashk_res.start, crash_size);
if (!memblock_is_region_memory(crashk_res.start, crash_size) ||
memblock_reserve(crashk_res.start, crash_size)) {
pr_err("Failed to reserve memory for crashkernel!\n");
crashk_res.start = crashk_res.end = 0;
return;
}
}
int overlaps_crashkernel(unsigned long start, unsigned long size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment