Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aee10c61 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paul Mackerras
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 41743a4e
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
#ifndef __ASSEMBLY__
#include <linux/cpumask.h>

typedef void (*crash_shutdown_t)(void);

#ifdef CONFIG_KEXEC

#ifdef __powerpc64__
@@ -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);

@@ -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__ */