diff options
author | Marcin Nowakowski <marcin.nowakowski@imgtec.com> | 2016-11-23 08:43:43 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-03 10:34:44 -0500 |
commit | 269aa43aad0f96673478fe2446abe54d7ad42e8f (patch) | |
tree | 838c29e4e75dba68e2117721495d3bae6217a182 /arch/mips/kernel/setup.c | |
parent | 39a3cb27c123df8e8461291cc9e86f1ac3f0ea06 (diff) |
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 <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14607/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r-- | arch/mips/kernel/setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
672 | { | 672 | { |
673 | int ret; | 673 | int ret; |
674 | 674 | ||
675 | if (crashk_res.start == crashk_res.end) | ||
676 | return; | ||
677 | |||
675 | ret = request_resource(res, &crashk_res); | 678 | ret = request_resource(res, &crashk_res); |
676 | if (!ret) | 679 | if (!ret) |
677 | pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n", | 680 | pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n", |