powerpc/fadump: reuse crashkernel parameter for fadump memory reservation
authorHari Bathini <[email protected]>
Mon, 8 May 2017 22:56:28 +0000 (15:56 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 May 2017 00:15:11 +0000 (17:15 -0700)
commit11550dc0a00b793236e8dedcf1f489f4627ddf7e
tree1e932a85b736ceaf90a062a42178cb86a60e7e47
parent22bd0177bd08677a8888f4d1d8361b0326f9119b
powerpc/fadump: reuse crashkernel parameter for fadump memory reservation

fadump supports specifying memory to reserve for fadump's crash kernel
with fadump_reserve_mem kernel parameter.  This parameter currently
supports passing a fixed memory size, like fadump_reserve_mem=<size>
only.  This patch aims to add support for other syntaxes like
range-based memory size
<range1>:<size1>[,<range2>:<size2>,<range3>:<size3>,...] which allows
using the same parameter to boot the kernel with different system RAM
sizes.

As crashkernel parameter already supports the above mentioned syntaxes,
this patch deprecates fadump_reserve_mem parameter and reuses
crashkernel parameter instead, to specify memory for fadump's crash
kernel memory reservation as well.  If any offset is provided in
crashkernel parameter, it will be ignored in case of fadump, as fadump
reserves memory at end of RAM.

Advantages using crashkernel parameter instead of fadump_reserve_mem
parameter are one less kernel parameter overall, code reuse and support
for multiple syntaxes to specify memory.

Suggested-by: Dave Young <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Hari Bathini <[email protected]>
Reviewed-by: Mahesh Salgaonkar <[email protected]>
Acked-by: Michael Ellerman <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Vivek Goyal <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/powerpc/kernel/fadump.c