Skip to content

Commit

Permalink
MIPS: Do not request resources for crashkernel if one isn't defined
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/14607/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
MJNowakowski authored and ralfbaechle committed Jan 3, 2017
1 parent 39a3cb2 commit 269aa43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 269aa43

Please sign in to comment.