diff options
| -rw-r--r-- | arch/powerpc/include/asm/kexec.h | 15 | ||||
| -rw-r--r-- | arch/powerpc/kernel/Makefile | 2 |
2 files changed, 7 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index 3736d9b33289..6dbffc981702 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h | |||
| @@ -33,12 +33,12 @@ | |||
| 33 | 33 | ||
| 34 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
| 35 | #include <linux/cpumask.h> | 35 | #include <linux/cpumask.h> |
| 36 | #include <asm/reg.h> | ||
| 36 | 37 | ||
| 37 | typedef void (*crash_shutdown_t)(void); | 38 | typedef void (*crash_shutdown_t)(void); |
| 38 | 39 | ||
| 39 | #ifdef CONFIG_KEXEC | 40 | #ifdef CONFIG_KEXEC |
| 40 | 41 | ||
| 41 | #ifdef __powerpc64__ | ||
| 42 | /* | 42 | /* |
| 43 | * This function is responsible for capturing register states if coming | 43 | * This function is responsible for capturing register states if coming |
| 44 | * via panic or invoking dump using sysrq-trigger. | 44 | * via panic or invoking dump using sysrq-trigger. |
| @@ -48,6 +48,7 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
| 48 | { | 48 | { |
| 49 | if (oldregs) | 49 | if (oldregs) |
| 50 | memcpy(newregs, oldregs, sizeof(*newregs)); | 50 | memcpy(newregs, oldregs, sizeof(*newregs)); |
| 51 | #ifdef __powerpc64__ | ||
| 51 | else { | 52 | else { |
| 52 | /* FIXME Merge this with xmon_save_regs ?? */ | 53 | /* FIXME Merge this with xmon_save_regs ?? */ |
| 53 | unsigned long tmp1, tmp2; | 54 | unsigned long tmp1, tmp2; |
| @@ -100,15 +101,11 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
| 100 | : "b" (newregs) | 101 | : "b" (newregs) |
| 101 | : "memory"); | 102 | : "memory"); |
| 102 | } | 103 | } |
| 103 | } | ||
| 104 | #else | 104 | #else |
| 105 | /* | 105 | else |
| 106 | * Provide a dummy definition to avoid build failures. Will remain | 106 | ppc_save_regs(newregs); |
| 107 | * empty till crash dump support is enabled. | 107 | #endif /* __powerpc64__ */ |
| 108 | */ | 108 | } |
| 109 | static inline void crash_setup_regs(struct pt_regs *newregs, | ||
| 110 | struct pt_regs *oldregs) { } | ||
| 111 | #endif /* !__powerpc64 __ */ | ||
| 112 | 109 | ||
| 113 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for | 110 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for |
| 114 | master to copy new code to 0 */ | 111 | master to copy new code to 0 */ |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 616c8891d858..089209aa2132 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
| @@ -102,7 +102,7 @@ endif | |||
| 102 | 102 | ||
| 103 | obj-$(CONFIG_PPC64) += $(obj64-y) | 103 | obj-$(CONFIG_PPC64) += $(obj64-y) |
| 104 | 104 | ||
| 105 | ifneq ($(CONFIG_XMON),) | 105 | ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),) |
| 106 | obj-y += ppc_save_regs.o | 106 | obj-y += ppc_save_regs.o |
| 107 | endif | 107 | endif |
| 108 | 108 | ||
