Skip to content

Commit

Permalink
sh: kexec: Register crashk_res
Browse files Browse the repository at this point in the history
Register crashk_res so that it can be used by kexec-tools
via /proc/iomem.

The crash kernel resource needs to be requested the same as the
other kernel resources due to the fact that it's handled during
the common path for adding new memory ranges, so it's added in to
__add_active_range() with the others. This ensures that the crash
kernel is properly reserved regardless of which memory range it's
placed in.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Simon Horman authored and Paul Mundt committed Sep 5, 2011
1 parent 9e79e3e commit 41309b7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,16 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
}

/*
* We don't know which RAM region contains kernel data,
* so we try it repeatedly and let the resource manager
* test it.
* We don't know which RAM region contains kernel data or
* the reserved crashkernel region, so try it repeatedly
* and let the resource manager test it.
*/
request_resource(res, &code_resource);
request_resource(res, &data_resource);
request_resource(res, &bss_resource);
#ifdef CONFIG_KEXEC
request_resource(res, &crashk_res);
#endif

/*
* Also make sure that there is a PMB mapping that covers this
Expand Down

0 comments on commit 41309b7

Please sign in to comment.