Skip to content

Commit

Permalink
powerpc: Provide dummy crash_shutdown_register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann authored and Paul Mackerras committed Jun 30, 2008
1 parent 41743a4 commit aee10c6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion include/asm-powerpc/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#ifndef __ASSEMBLY__
#include <linux/cpumask.h>

typedef void (*crash_shutdown_t)(void);

#ifdef CONFIG_KEXEC

#ifdef __powerpc64__
Expand Down Expand Up @@ -123,7 +125,6 @@ struct pt_regs;
extern void default_machine_kexec(struct kimage *image);
extern int default_machine_kexec_prepare(struct kimage *image);
extern void default_machine_crash_shutdown(struct pt_regs *regs);
typedef void (*crash_shutdown_t)(void);
extern int crash_shutdown_register(crash_shutdown_t handler);
extern int crash_shutdown_unregister(crash_shutdown_t handler);

Expand All @@ -143,6 +144,16 @@ static inline int overlaps_crashkernel(unsigned long start, unsigned long size)

static inline void reserve_crashkernel(void) { ; }

static inline int crash_shutdown_register(crash_shutdown_t handler)
{
return 0;
}

static inline int crash_shutdown_unregister(crash_shutdown_t handler)
{
return 0;
}

#endif /* CONFIG_KEXEC */
#endif /* ! __ASSEMBLY__ */
#endif /* __KERNEL__ */
Expand Down

0 comments on commit aee10c6

Please sign in to comment.