linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc: reserve memory for capture kernel after hugepages init
@ 2019-06-27 19:21 Hari Bathini
  2019-06-27 19:21 ` [PATCH 2/2] powerpc: avoid adjusting memory_limit for capture kernel memory reservation Hari Bathini
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hari Bathini @ 2019-06-27 19:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Mahesh J Salgaonkar, Ananth N Mavinakayanahalli

Sometimes, memory reservation for KDump/FADump can overlap with memory
marked for hugepages. This overlap leads to error, hang in KDump case
and copy error reported by f/w in case of FADump, while trying to
capture dump. Report error while setting up memory for the capture
kernel instead of running into issues while capturing dump, by moving
KDump/FADump reservation below MMU early init and failing gracefully
when hugepages memory overlaps with capture kernel memory.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
 arch/powerpc/kernel/prom.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 7159e79..454e19cf 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -731,14 +731,6 @@ void __init early_init_devtree(void *params)
 	if (PHYSICAL_START > MEMORY_START)
 		memblock_reserve(MEMORY_START, 0x8000);
 	reserve_kdump_trampoline();
-#ifdef CONFIG_FA_DUMP
-	/*
-	 * If we fail to reserve memory for firmware-assisted dump then
-	 * fallback to kexec based kdump.
-	 */
-	if (fadump_reserve_mem() == 0)
-#endif
-		reserve_crashkernel();
 	early_reserve_mem();
 
 	/* Ensure that total memory size is page-aligned. */
@@ -777,6 +769,14 @@ void __init early_init_devtree(void *params)
 #endif
 
 	mmu_early_init_devtree();
+#ifdef CONFIG_FA_DUMP
+	/*
+	 * If we fail to reserve memory for firmware-assisted dump then
+	 * fallback to kexec based kdump.
+	 */
+	if (fadump_reserve_mem() == 0)
+#endif
+		reserve_crashkernel();
 
 #ifdef CONFIG_PPC_POWERNV
 	/* Scan and build the list of machine check recoverable ranges */


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-01 11:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 19:21 [PATCH 1/2] powerpc: reserve memory for capture kernel after hugepages init Hari Bathini
2019-06-27 19:21 ` [PATCH 2/2] powerpc: avoid adjusting memory_limit for capture kernel memory reservation Hari Bathini
2019-07-22 17:49   ` Michal Suchánek
2019-07-24  5:56     ` Mahesh Jagannath Salgaonkar
2020-01-06 16:10       ` Michal Suchánek
2020-02-18 16:34   ` Michal Suchánek
2020-02-18 16:28 ` [PATCH rebased 1/2] powerpc: reserve memory for capture kernel after hugepages init Michal Suchanek
2020-02-18 16:28   ` [PATCH rebased 2/2] powerpc: avoid adjusting memory_limit for capture kernel memory reservation Michal Suchanek
2020-03-05 18:42   ` [PATCH rebased 1/2] powerpc: reserve memory for capture kernel after hugepages init Michal Suchánek
2022-02-01 11:18 ` [PATCH " Christophe Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).