diff options
author | Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> | 2012-02-15 20:14:45 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-02-22 18:50:01 -0500 |
commit | ebaeb5ae24379b5b635dc1d1fa6df904bc95b4d9 (patch) | |
tree | 4c1d54e9ec25f48dd05708ed62d5eb6db9d0ba9d /arch/powerpc/kernel/setup-common.c | |
parent | 2df173d9e85d9e2c6a8933c63f0c034accff7e0f (diff) |
fadump: Convert firmware-assisted cpu state dump data into elf notes.
When registered for firmware assisted dump on powerpc, firmware preserves
the registers for the active CPUs during a system crash. This patch reads
the cpu register data stored in Firmware-assisted dump format (except for
crashing cpu) and converts it into elf notes and updates the PT_NOTE program
header accordingly. The exact register state for crashing cpu is saved to
fadump crash info structure in scratch area during crash_fadump() and read
during second kernel boot.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 77bb77da05c1..4e62a56e1a95 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <asm/xmon.h> | 61 | #include <asm/xmon.h> |
62 | #include <asm/cputhreads.h> | 62 | #include <asm/cputhreads.h> |
63 | #include <mm/mmu_decl.h> | 63 | #include <mm/mmu_decl.h> |
64 | #include <asm/fadump.h> | ||
64 | 65 | ||
65 | #include "setup.h" | 66 | #include "setup.h" |
66 | 67 | ||
@@ -639,6 +640,11 @@ EXPORT_SYMBOL(check_legacy_ioport); | |||
639 | static int ppc_panic_event(struct notifier_block *this, | 640 | static int ppc_panic_event(struct notifier_block *this, |
640 | unsigned long event, void *ptr) | 641 | unsigned long event, void *ptr) |
641 | { | 642 | { |
643 | /* | ||
644 | * If firmware-assisted dump has been registered then trigger | ||
645 | * firmware-assisted dump and let firmware handle everything else. | ||
646 | */ | ||
647 | crash_fadump(NULL, ptr); | ||
642 | ppc_md.panic(ptr); /* May not return */ | 648 | ppc_md.panic(ptr); /* May not return */ |
643 | return NOTIFY_DONE; | 649 | return NOTIFY_DONE; |
644 | } | 650 | } |