summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/fadump-internal.h
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2020-04-20 14:26:09 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2020-05-04 22:29:58 +1000
commit02c04e374e176ae3a3f64a682f80702f8d2fb65d (patch)
treeb7e50d223fc90387dad3faf4130664f7c6bbe90d /arch/powerpc/include/asm/fadump-internal.h
parent43c8a496fa37187b54f7df71fb8262acc6bf6200 (diff)
downloadlinux-stable-02c04e374e176ae3a3f64a682f80702f8d2fb65d.tar.gz
linux-stable-02c04e374e176ae3a3f64a682f80702f8d2fb65d.tar.bz2
linux-stable-02c04e374e176ae3a3f64a682f80702f8d2fb65d.zip
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
Diffstat (limited to 'arch/powerpc/include/asm/fadump-internal.h')
-rw-r--r--arch/powerpc/include/asm/fadump-internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc/include/asm/fadump-internal.h
index c814a2b55389..8d61c8f3fec4 100644
--- a/arch/powerpc/include/asm/fadump-internal.h
+++ b/arch/powerpc/include/asm/fadump-internal.h
@@ -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 */