powerpc/fadump: use static allocation for reserved memory ranges
authorHari Bathini <hbathini@linux.ibm.com>
Mon, 20 Apr 2020 08:56:09 +0000 (14:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:31:21 +0000 (09:31 +0200)
commit3e9211d98803bb0e0a5b4678087a4703bc449db3
tree43b9c6ea0668afa539a4b4a639f3efe08d2fe29e
parentc81e34c4346f9d3ba21a3c6f7491a6e7e330a7ee
powerpc/fadump: use static allocation for reserved memory ranges

commit 02c04e374e176ae3a3f64a682f80702f8d2fb65d upstream.

At times, memory ranges have to be looked up during early boot, when
kernel couldn't be initialized for dynamic memory allocation. In fact,
reserved-ranges look up is needed during FADump memory reservation.
Without accounting for reserved-ranges in reserving memory for FADump,
MPIPL boot fails with memory corruption issues. So, extend memory
ranges handling to support static allocation and populate reserved
memory ranges during early boot.

Fixes: dda9dbfeeb7a ("powerpc/fadump: consider reserved ranges while releasing memory")
Cc: stable@vger.kernel.org
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/158737294432.26700.4830263187856221314.stgit@hbathini.in.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/fadump-internal.h
arch/powerpc/kernel/fadump.c