[PATCH v3 13/16] powernv/fadump: Skip processing /proc/vmcore when only OPAL core exists

Hari Bathini hbathini at linux.ibm.com
Wed Jun 26 06:47:36 AEST 2019


If OPAL crashes when the kernel is not registered for FADump, F/W still
provides info to export OPAL core. Make sure '/proc/vmcore' processing
is skipped as only data relevant to OPAL core is exported in such
scenario.

Signed-off-by: Hari Bathini <hbathini at linux.ibm.com>
---
 arch/powerpc/platforms/powernv/opal-fadump.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/opal-fadump.c b/arch/powerpc/platforms/powernv/opal-fadump.c
index 0d3417a..2c87812 100644
--- a/arch/powerpc/platforms/powernv/opal-fadump.c
+++ b/arch/powerpc/platforms/powernv/opal-fadump.c
@@ -86,6 +86,17 @@ static void update_fadump_config(struct fw_dump *fadump_conf,
 			j++;
 		}
 
+		/*
+		 * If dump is active and no kernel memory region is found in
+		 * result-table, it means OPAL crashed on system with MPIPL
+		 * support and the kernel was not registered for FADump at the
+		 * time of crash. Skip processing /proc/vmcore in that case.
+		 */
+		if (j == 0) {
+			fadump_conf->dump_active = 0;
+			return;
+		}
+
 		fadump_conf->rmr_regions_cnt = j;
 		pr_debug("Real memory regions count: %lu\n",
 			 fadump_conf->rmr_regions_cnt);



More information about the Linuxppc-dev mailing list