summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/opal-fadump.c
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2019-09-11 16:53:28 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2019-09-13 16:04:44 +0200
commita4e2e2ca2f7bddf6d5d788033cc56f40af6e9c5a (patch)
tree05a542bed26853c3f09f7be8d8c06aae10bed3a3 /arch/powerpc/platforms/powernv/opal-fadump.c
parentpowerpc/fadump: Warn before processing partial crashdump (diff)
downloadlinux-a4e2e2ca2f7bddf6d5d788033cc56f40af6e9c5a.tar.xz
linux-a4e2e2ca2f7bddf6d5d788033cc56f40af6e9c5a.zip
powerpc/fadump: handle invalidation of crashdump and re-registraion
Make OPAL call to indicate that the dump is processed and the metadata area in OPAL can be cleared/released. Also, setup/initialize FADump for re-registration. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/156821356046.5656.12270927048195494911.stgit@hbathini.in.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-fadump.c')
-rw-r--r--arch/powerpc/platforms/powernv/opal-fadump.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-fadump.c b/arch/powerpc/platforms/powernv/opal-fadump.c
index 533adae545d8..ef6fb1fc66cb 100644
--- a/arch/powerpc/platforms/powernv/opal-fadump.c
+++ b/arch/powerpc/platforms/powernv/opal-fadump.c
@@ -254,7 +254,17 @@ static int opal_fadump_unregister(struct fw_dump *fadump_conf)
static int opal_fadump_invalidate(struct fw_dump *fadump_conf)
{
- return -EIO;
+ s64 rc;
+
+ rc = opal_mpipl_update(OPAL_MPIPL_FREE_PRESERVED_MEMORY, 0, 0, 0);
+ if (rc) {
+ pr_err("Failed to invalidate - unexpected Error(%lld).\n", rc);
+ return -EIO;
+ }
+
+ fadump_conf->dump_active = 0;
+ opal_fdm_active = NULL;
+ return 0;
}
static void opal_fadump_cleanup(struct fw_dump *fadump_conf)