fadump: Invalidate the fadump registration during machine shutdown.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Thu, 16 Feb 2012 01:15:15 +0000 (01:15 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 22 Feb 2012 23:50:03 +0000 (10:50 +1100)
If dump is active during system reboot, shutdown or halt then invalidate
the fadump registration as it does not get invalidated automatically.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/setup-common.c

index 4e62a56e1a954f2569e4a21a3558b02ea7310e9c..b0ebdeab9494386368fd4ce8b0f7ed39e9814977 100644 (file)
@@ -110,6 +110,14 @@ EXPORT_SYMBOL(ppc_do_canonicalize_irqs);
 /* also used by kexec */
 void machine_shutdown(void)
 {
+#ifdef CONFIG_FA_DUMP
+       /*
+        * if fadump is active, cleanup the fadump registration before we
+        * shutdown.
+        */
+       fadump_cleanup();
+#endif
+
        if (ppc_md.machine_shutdown)
                ppc_md.machine_shutdown();
 }