diff options
author | Hari Bathini <hbathini@linux.ibm.com> | 2019-09-11 17:51:16 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-09-13 17:04:43 +0300 |
commit | 2790d01d1e1d22735d848eec55668f7d44417e22 (patch) | |
tree | f759721874ffceb66fcf964994107f6005751e59 /arch/powerpc/platforms/powernv/opal-fadump.c | |
parent | 742a265accd3e3afcc8e7b17f409c93c1de8be85 (diff) | |
download | linux-2790d01d1e1d22735d848eec55668f7d44417e22.tar.xz |
powerpc/fadump: reset metadata address during clean up
During kexec boot, metadata address needs to be reset to avoid running
into errors interpreting stale metadata address, in case the kexec'ed
kernel crashes before metadata address could be setup again.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/156821346629.5656.10783321582005237813.stgit@hbathini.in.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-fadump.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-fadump.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-fadump.c b/arch/powerpc/platforms/powernv/opal-fadump.c index 21de832f2ba4..871a129c73d3 100644 --- a/arch/powerpc/platforms/powernv/opal-fadump.c +++ b/arch/powerpc/platforms/powernv/opal-fadump.c @@ -105,6 +105,15 @@ static int opal_fadump_invalidate(struct fw_dump *fadump_conf) return -EIO; } +static void opal_fadump_cleanup(struct fw_dump *fadump_conf) +{ + s64 ret; + + ret = opal_mpipl_register_tag(OPAL_MPIPL_TAG_KERNEL, 0); + if (ret != OPAL_SUCCESS) + pr_warn("Could not reset (%llu) kernel metadata tag!\n", ret); +} + static int __init opal_fadump_process(struct fw_dump *fadump_conf) { return -EINVAL; @@ -145,6 +154,7 @@ static struct fadump_ops opal_fadump_ops = { .fadump_register = opal_fadump_register, .fadump_unregister = opal_fadump_unregister, .fadump_invalidate = opal_fadump_invalidate, + .fadump_cleanup = opal_fadump_cleanup, .fadump_process = opal_fadump_process, .fadump_region_show = opal_fadump_region_show, .fadump_trigger = opal_fadump_trigger, |