From: Marcin Nowakowski Date: Wed, 23 Nov 2016 13:43:43 +0000 (+0100) Subject: MIPS: Do not request resources for crashkernel if one isn't defined X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=269aa43aad0f96673478fe2446abe54d7ad42e8f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git MIPS: Do not request resources for crashkernel if one isn't defined When KEXEC is enabled but crashkernel details are not passed through the kernel commandline unnecessary resources are requested (start==end==0) Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14607/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index f66e5ce505b2..0058feaa65e5 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -672,6 +672,9 @@ static void __init request_crashkernel(struct resource *res) { int ret; + if (crashk_res.start == crashk_res.end) + return; + ret = request_resource(res, &crashk_res); if (!ret) pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n",