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: dda9dbfeeb
("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
This commit is contained in:

committed by
Michael Ellerman

parent
43c8a496fa
commit
02c04e374e
@@ -64,12 +64,14 @@ struct fadump_memory_range {
|
||||
};
|
||||
|
||||
/* fadump memory ranges info */
|
||||
#define RNG_NAME_SZ 16
|
||||
struct fadump_mrange_info {
|
||||
char name[16];
|
||||
char name[RNG_NAME_SZ];
|
||||
struct fadump_memory_range *mem_ranges;
|
||||
u32 mem_ranges_sz;
|
||||
u32 mem_range_cnt;
|
||||
u32 max_mem_ranges;
|
||||
bool is_static;
|
||||
};
|
||||
|
||||
/* Platform specific callback functions */
|
||||
|
Reference in New Issue
Block a user