aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2008-01-17 23:50:30 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-25 06:52:50 -0500
commit496b010e1e70a9b4286fa34f19523f24a194f119 (patch)
tree82304fcb3342e1204fe2b2b69c0f396068ad409c /include/asm-powerpc
parentc3b75bd7bbf4a0438dc140033b80657995fd30ed (diff)
[POWERPC] kdump shutdown hook support
This adds hooks into the default_machine_crash_shutdown so drivers can register a function to be run in the first kernel before we hand off to the second kernel. This should only be used in exceptional circumstances, like where the device can't be reset in the second kernel alone (as is the case with eHEA). To emphasize this, the number of handles allowed to be registered is currently #def to 1. This uses the setjmp/longjmp code around the call out to the registered hooks, so any bogus exceptions we encounter will hopefully be recoverable. Tested with bogus data and instruction exceptions. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/kexec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index b6f817b8ba3d..701857bc8e24 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -123,6 +123,9 @@ struct pt_regs;
123extern void default_machine_kexec(struct kimage *image); 123extern void default_machine_kexec(struct kimage *image);
124extern int default_machine_kexec_prepare(struct kimage *image); 124extern int default_machine_kexec_prepare(struct kimage *image);
125extern void default_machine_crash_shutdown(struct pt_regs *regs); 125extern void default_machine_crash_shutdown(struct pt_regs *regs);
126typedef void (*crash_shutdown_t)(void);
127extern int crash_shutdown_register(crash_shutdown_t handler);
128extern int crash_shutdown_unregister(crash_shutdown_t handler);
126 129
127extern void machine_kexec_simple(struct kimage *image); 130extern void machine_kexec_simple(struct kimage *image);
128extern void crash_kexec_secondary(struct pt_regs *regs); 131extern void crash_kexec_secondary(struct pt_regs *regs);