diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-06-12 05:14:34 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 08:30:55 -0400 |
commit | aee10c6145199f872bc51f811b115a4b686b2426 (patch) | |
tree | 138ff9e8eb0929992d0c97cc4da67e7a939b5071 /include/asm-powerpc/kexec.h | |
parent | 41743a4e34f0777f51c1cf0675b91508ba143050 (diff) |
powerpc: Provide dummy crash_shutdown_register
When kexec is disabled, the crash_shutdown_{un,}register
functions are not available in the kernel.
This provides dummy inline functions for those so that
the callers don't have to worry about it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/kexec.h')
-rw-r--r-- | include/asm-powerpc/kexec.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 701857bc8e24..acdcdc66f1b6 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
@@ -34,6 +34,8 @@ | |||
34 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
35 | #include <linux/cpumask.h> | 35 | #include <linux/cpumask.h> |
36 | 36 | ||
37 | typedef void (*crash_shutdown_t)(void); | ||
38 | |||
37 | #ifdef CONFIG_KEXEC | 39 | #ifdef CONFIG_KEXEC |
38 | 40 | ||
39 | #ifdef __powerpc64__ | 41 | #ifdef __powerpc64__ |
@@ -123,7 +125,6 @@ struct pt_regs; | |||
123 | extern void default_machine_kexec(struct kimage *image); | 125 | extern void default_machine_kexec(struct kimage *image); |
124 | extern int default_machine_kexec_prepare(struct kimage *image); | 126 | extern int default_machine_kexec_prepare(struct kimage *image); |
125 | extern void default_machine_crash_shutdown(struct pt_regs *regs); | 127 | extern void default_machine_crash_shutdown(struct pt_regs *regs); |
126 | typedef void (*crash_shutdown_t)(void); | ||
127 | extern int crash_shutdown_register(crash_shutdown_t handler); | 128 | extern int crash_shutdown_register(crash_shutdown_t handler); |
128 | extern int crash_shutdown_unregister(crash_shutdown_t handler); | 129 | extern int crash_shutdown_unregister(crash_shutdown_t handler); |
129 | 130 | ||
@@ -143,6 +144,16 @@ static inline int overlaps_crashkernel(unsigned long start, unsigned long size) | |||
143 | 144 | ||
144 | static inline void reserve_crashkernel(void) { ; } | 145 | static inline void reserve_crashkernel(void) { ; } |
145 | 146 | ||
147 | static inline int crash_shutdown_register(crash_shutdown_t handler) | ||
148 | { | ||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static inline int crash_shutdown_unregister(crash_shutdown_t handler) | ||
153 | { | ||
154 | return 0; | ||
155 | } | ||
156 | |||
146 | #endif /* CONFIG_KEXEC */ | 157 | #endif /* CONFIG_KEXEC */ |
147 | #endif /* ! __ASSEMBLY__ */ | 158 | #endif /* ! __ASSEMBLY__ */ |
148 | #endif /* __KERNEL__ */ | 159 | #endif /* __KERNEL__ */ |