aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/kexec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/kexec.h')
-rw-r--r--include/asm-powerpc/kexec.h28
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__
112extern void kexec_smp_wait(void); /* get and clear naca physid, wait for 113extern 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 */
114extern void __init kexec_setup(void);
115extern int crashing_cpu; 115extern int crashing_cpu;
116extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)); 116extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
117#endif /* __powerpc64 __ */ 117extern cpumask_t cpus_in_sr;
118static inline int kexec_sr_activated(int cpu)
119{
120 return cpu_isset(cpu,cpus_in_sr);
121}
118 122
119struct kimage; 123struct kimage;
120struct pt_regs; 124struct pt_regs;
@@ -123,8 +127,22 @@ extern int default_machine_kexec_prepare(struct kimage *image);
123extern void default_machine_crash_shutdown(struct pt_regs *regs); 127extern void default_machine_crash_shutdown(struct pt_regs *regs);
124 128
125extern void machine_kexec_simple(struct kimage *image); 129extern void machine_kexec_simple(struct kimage *image);
130extern void crash_kexec_secondary(struct pt_regs *regs);
131extern int overlaps_crashkernel(unsigned long start, unsigned long size);
132extern void reserve_crashkernel(void);
133
134#else /* !CONFIG_KEXEC */
135static inline int kexec_sr_activated(int cpu) { return 0; }
136static inline void crash_kexec_secondary(struct pt_regs *regs) { }
137
138static inline int overlaps_crashkernel(unsigned long start, unsigned long size)
139{
140 return 0;
141}
142
143static 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 */