[PATCH 13/18] powernv/fadump: Skip processing /proc/vmcore when only OPAL core exists
Hari Bathini
hbathini at linux.ibm.com
Fri Feb 22 04:36:52 AEDT 2019
If OPAL crashes when the kernel is not registered for FADump, F/W still
exports OPAL core through result-table DT node. 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 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal-fadump.c b/arch/powerpc/platforms/powernv/opal-fadump.c
index 2b36b5f..36077bd 100644
--- a/arch/powerpc/platforms/powernv/opal-fadump.c
+++ b/arch/powerpc/platforms/powernv/opal-fadump.c
@@ -108,6 +108,18 @@ static void update_fadump_config(struct fw_dump *fadump_conf,
be64_to_cpu(fdm->section[i].dest_size);
}
}
+
+ /*
+ * 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