diff options
Diffstat (limited to 'include/asm-powerpc/kexec.h')
-rw-r--r-- | include/asm-powerpc/kexec.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 6a2af2f6853..11cbdf81fd2 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
@@ -31,9 +31,11 @@ | |||
31 | #define KEXEC_ARCH KEXEC_ARCH_PPC | 31 | #define KEXEC_ARCH KEXEC_ARCH_PPC |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifndef __ASSEMBLY__ | ||
35 | #include <linux/cpumask.h> | ||
36 | |||
34 | #ifdef CONFIG_KEXEC | 37 | #ifdef CONFIG_KEXEC |
35 | 38 | ||
36 | #ifndef __ASSEMBLY__ | ||
37 | #ifdef __powerpc64__ | 39 | #ifdef __powerpc64__ |
38 | /* | 40 | /* |
39 | * This function is responsible for capturing register states if coming | 41 | * This function is responsible for capturing register states if coming |
@@ -108,13 +110,15 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
108 | 110 | ||
109 | #define MAX_NOTE_BYTES 1024 | 111 | #define MAX_NOTE_BYTES 1024 |
110 | 112 | ||
111 | #ifdef __powerpc64__ | ||
112 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for | 113 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for |
113 | master to copy new code to 0 */ | 114 | master to copy new code to 0 */ |
114 | extern void __init kexec_setup(void); | ||
115 | extern int crashing_cpu; | 115 | extern int crashing_cpu; |
116 | extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)); | 116 | extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)); |
117 | #endif /* __powerpc64 __ */ | 117 | extern cpumask_t cpus_in_sr; |
118 | static inline int kexec_sr_activated(int cpu) | ||
119 | { | ||
120 | return cpu_isset(cpu,cpus_in_sr); | ||
121 | } | ||
118 | 122 | ||
119 | struct kimage; | 123 | struct kimage; |
120 | struct pt_regs; | 124 | struct pt_regs; |
@@ -123,8 +127,22 @@ extern int default_machine_kexec_prepare(struct kimage *image); | |||
123 | extern void default_machine_crash_shutdown(struct pt_regs *regs); | 127 | extern void default_machine_crash_shutdown(struct pt_regs *regs); |
124 | 128 | ||
125 | extern void machine_kexec_simple(struct kimage *image); | 129 | extern void machine_kexec_simple(struct kimage *image); |
130 | extern void crash_kexec_secondary(struct pt_regs *regs); | ||
131 | extern int overlaps_crashkernel(unsigned long start, unsigned long size); | ||
132 | extern void reserve_crashkernel(void); | ||
133 | |||
134 | #else /* !CONFIG_KEXEC */ | ||
135 | static inline int kexec_sr_activated(int cpu) { return 0; } | ||
136 | static inline void crash_kexec_secondary(struct pt_regs *regs) { } | ||
137 | |||
138 | static inline int overlaps_crashkernel(unsigned long start, unsigned long size) | ||
139 | { | ||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static inline void reserve_crashkernel(void) { ; } | ||
126 | 144 | ||
127 | #endif /* ! __ASSEMBLY__ */ | ||
128 | #endif /* CONFIG_KEXEC */ | 145 | #endif /* CONFIG_KEXEC */ |
146 | #endif /* ! __ASSEMBLY__ */ | ||
129 | #endif /* __KERNEL__ */ | 147 | #endif /* __KERNEL__ */ |
130 | #endif /* _ASM_POWERPC_KEXEC_H */ | 148 | #endif /* _ASM_POWERPC_KEXEC_H */ |