]> Pileus Git - ~andy/linux/blobdiff - arch/powerpc/kernel/setup-common.c
ath6kl: fix fw capability parsing
[~andy/linux] / arch / powerpc / kernel / setup-common.c
index 77bb77da05c1d5ad35ef17788f26cbe2878135a4..b0ebdeab9494386368fd4ce8b0f7ed39e9814977 100644 (file)
@@ -61,6 +61,7 @@
 #include <asm/xmon.h>
 #include <asm/cputhreads.h>
 #include <mm/mmu_decl.h>
+#include <asm/fadump.h>
 
 #include "setup.h"
 
@@ -109,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();
 }
@@ -639,6 +648,11 @@ EXPORT_SYMBOL(check_legacy_ioport);
 static int ppc_panic_event(struct notifier_block *this,
                              unsigned long event, void *ptr)
 {
+       /*
+        * If firmware-assisted dump has been registered then trigger
+        * firmware-assisted dump and let firmware handle everything else.
+        */
+       crash_fadump(NULL, ptr);
        ppc_md.panic(ptr);  /* May not return */
        return NOTIFY_DONE;
 }