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)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 4 May 2020 12:29:58 +0000 (22:29 +1000)
commit02c04e374e176ae3a3f64a682f80702f8d2fb65d
treeb7e50d223fc90387dad3faf4130664f7c6bbe90d
parent43c8a496fa37187b54f7df71fb8262acc6bf6200
powerpc/fadump: use static allocation for reserved memory ranges

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
arch/powerpc/include/asm/fadump-internal.h
arch/powerpc/kernel/fadump.c