This replaces the dummy crash_setup_regs function with full-fledged
crash_setup_regs implementation. On PPC32 we simply use the new
ppc_save_regs function to dump the registers.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
#ifndef __ASSEMBLY__
#include <linux/cpumask.h>
#ifndef __ASSEMBLY__
#include <linux/cpumask.h>
typedef void (*crash_shutdown_t)(void);
#ifdef CONFIG_KEXEC
typedef void (*crash_shutdown_t)(void);
#ifdef CONFIG_KEXEC
/*
* This function is responsible for capturing register states if coming
* via panic or invoking dump using sysrq-trigger.
/*
* This function is responsible for capturing register states if coming
* via panic or invoking dump using sysrq-trigger.
{
if (oldregs)
memcpy(newregs, oldregs, sizeof(*newregs));
{
if (oldregs)
memcpy(newregs, oldregs, sizeof(*newregs));
else {
/* FIXME Merge this with xmon_save_regs ?? */
unsigned long tmp1, tmp2;
else {
/* FIXME Merge this with xmon_save_regs ?? */
unsigned long tmp1, tmp2;
: "b" (newregs)
: "memory");
}
: "b" (newregs)
: "memory");
}
-/*
- * Provide a dummy definition to avoid build failures. Will remain
- * empty till crash dump support is enabled.
- */
-static inline void crash_setup_regs(struct pt_regs *newregs,
- struct pt_regs *oldregs) { }
-#endif /* !__powerpc64 __ */
+ else
+ ppc_save_regs(newregs);
+#endif /* __powerpc64__ */
+}
extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
master to copy new code to 0 */
extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
master to copy new code to 0 */
obj-$(CONFIG_PPC64) += $(obj64-y)
obj-$(CONFIG_PPC64) += $(obj64-y)
+ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),)
obj-y += ppc_save_regs.o
endif
obj-y += ppc_save_regs.o
endif