blob: 5e320ddaaa829cb2ffef93b34cf6ceeaf46b2341 [file] [log] [blame]
Eric W. Biedermandc009d92005-06-25 14:57:52 -07001#ifndef LINUX_KEXEC_H
2#define LINUX_KEXEC_H
3
Geoff Levandcf2df632015-02-17 13:45:56 -08004#define IND_DESTINATION_BIT 0
5#define IND_INDIRECTION_BIT 1
6#define IND_DONE_BIT 2
7#define IND_SOURCE_BIT 3
8
9#define IND_DESTINATION (1 << IND_DESTINATION_BIT)
10#define IND_INDIRECTION (1 << IND_INDIRECTION_BIT)
11#define IND_DONE (1 << IND_DONE_BIT)
12#define IND_SOURCE (1 << IND_SOURCE_BIT)
Geoff Levandb28c2ee2015-02-17 13:45:58 -080013#define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE)
Geoff Levandcf2df632015-02-17 13:45:56 -080014
15#if !defined(__ASSEMBLY__)
16
Russell King43546d82016-08-02 14:06:04 -070017#include <asm/io.h>
18
David Howells607ca462012-10-13 10:46:48 +010019#include <uapi/linux/kexec.h>
maximilian attems29a5c672012-05-31 16:26:27 -070020
Dave Young2965faa2015-09-09 15:38:55 -070021#ifdef CONFIG_KEXEC_CORE
Eric W. Biedermandc009d92005-06-25 14:57:52 -070022#include <linux/list.h>
23#include <linux/linkage.h>
24#include <linux/compat.h>
Haren Myneni9c15e852006-02-10 01:51:05 -080025#include <linux/ioport.h>
Simon Horman6672f762007-05-08 00:28:22 -070026#include <linux/elfcore.h>
27#include <linux/elf.h>
Vivek Goyal12db5562014-08-08 14:26:04 -070028#include <linux/module.h>
Eric W. Biedermandc009d92005-06-25 14:57:52 -070029#include <asm/kexec.h>
30
31/* Verify architecture specific macros are defined */
32
33#ifndef KEXEC_SOURCE_MEMORY_LIMIT
34#error KEXEC_SOURCE_MEMORY_LIMIT not defined
35#endif
36
37#ifndef KEXEC_DESTINATION_MEMORY_LIMIT
38#error KEXEC_DESTINATION_MEMORY_LIMIT not defined
39#endif
40
41#ifndef KEXEC_CONTROL_MEMORY_LIMIT
42#error KEXEC_CONTROL_MEMORY_LIMIT not defined
43#endif
44
Martin Schwidefsky7e01b5a2015-04-16 14:47:33 +020045#ifndef KEXEC_CONTROL_MEMORY_GFP
Russell Kingdc5ccca2016-08-02 14:05:54 -070046#define KEXEC_CONTROL_MEMORY_GFP (GFP_KERNEL | __GFP_NORETRY)
Martin Schwidefsky7e01b5a2015-04-16 14:47:33 +020047#endif
48
Huang Ying163f6872008-08-15 00:40:22 -070049#ifndef KEXEC_CONTROL_PAGE_SIZE
50#error KEXEC_CONTROL_PAGE_SIZE not defined
Eric W. Biedermandc009d92005-06-25 14:57:52 -070051#endif
52
53#ifndef KEXEC_ARCH
54#error KEXEC_ARCH not defined
55#endif
56
Michael Holzheu3d214fa2011-10-30 15:16:36 +010057#ifndef KEXEC_CRASH_CONTROL_MEMORY_LIMIT
58#define KEXEC_CRASH_CONTROL_MEMORY_LIMIT KEXEC_CONTROL_MEMORY_LIMIT
59#endif
60
Michael Holzheu558df722011-10-30 15:16:43 +010061#ifndef KEXEC_CRASH_MEM_ALIGN
62#define KEXEC_CRASH_MEM_ALIGN PAGE_SIZE
63#endif
64
Simon Horman6672f762007-05-08 00:28:22 -070065#define KEXEC_NOTE_HEAD_BYTES ALIGN(sizeof(struct elf_note), 4)
66#define KEXEC_CORE_NOTE_NAME "CORE"
67#define KEXEC_CORE_NOTE_NAME_BYTES ALIGN(sizeof(KEXEC_CORE_NOTE_NAME), 4)
68#define KEXEC_CORE_NOTE_DESC_BYTES ALIGN(sizeof(struct elf_prstatus), 4)
69/*
70 * The per-cpu notes area is a list of notes terminated by a "NULL"
71 * note header. For kdump, the code in vmcore.c runs in the context
72 * of the second kernel to combine them into one note.
73 */
Michael Holzheucb78edf2012-01-20 14:34:16 -080074#ifndef KEXEC_NOTE_BYTES
Simon Horman6672f762007-05-08 00:28:22 -070075#define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) + \
76 KEXEC_CORE_NOTE_NAME_BYTES + \
77 KEXEC_CORE_NOTE_DESC_BYTES )
Michael Holzheucb78edf2012-01-20 14:34:16 -080078#endif
Simon Horman6672f762007-05-08 00:28:22 -070079
Eric W. Biedermandc009d92005-06-25 14:57:52 -070080/*
81 * This structure is used to hold the arguments that are used when loading
82 * kernel binaries.
83 */
84
85typedef unsigned long kimage_entry_t;
Eric W. Biedermandc009d92005-06-25 14:57:52 -070086
Eric W. Biedermandc009d92005-06-25 14:57:52 -070087struct kexec_segment {
Vivek Goyal815d5702014-08-08 14:25:52 -070088 /*
89 * This pointer can point to user memory if kexec_load() system
90 * call is used or will point to kernel memory if
91 * kexec_file_load() system call is used.
92 *
93 * Use ->buf when expecting to deal with user memory and use ->kbuf
94 * when expecting to deal with kernel memory.
95 */
96 union {
97 void __user *buf;
98 void *kbuf;
99 };
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700100 size_t bufsz;
maximilian attems29a5c672012-05-31 16:26:27 -0700101 unsigned long mem;
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700102 size_t memsz;
103};
104
105#ifdef CONFIG_COMPAT
106struct compat_kexec_segment {
107 compat_uptr_t buf;
108 compat_size_t bufsz;
109 compat_ulong_t mem; /* User space sees this as a (void *) ... */
110 compat_size_t memsz;
111};
112#endif
113
Xunlei Pang978e30c2016-01-20 15:00:36 -0800114#ifdef CONFIG_KEXEC_FILE
Vivek Goyal12db5562014-08-08 14:26:04 -0700115struct purgatory_info {
116 /* Pointer to elf header of read only purgatory */
117 Elf_Ehdr *ehdr;
118
119 /* Pointer to purgatory sechdrs which are modifiable */
120 Elf_Shdr *sechdrs;
121 /*
122 * Temporary buffer location where purgatory is loaded and relocated
123 * This memory can be freed post image load
124 */
125 void *purgatory_buf;
126
127 /* Address where purgatory is finally loaded and is executed from */
128 unsigned long purgatory_load_addr;
129};
130
Xunlei Pang978e30c2016-01-20 15:00:36 -0800131typedef int (kexec_probe_t)(const char *kernel_buf, unsigned long kernel_size);
132typedef void *(kexec_load_t)(struct kimage *image, char *kernel_buf,
133 unsigned long kernel_len, char *initrd,
134 unsigned long initrd_len, char *cmdline,
135 unsigned long cmdline_len);
136typedef int (kexec_cleanup_t)(void *loader_data);
137
138#ifdef CONFIG_KEXEC_VERIFY_SIG
139typedef int (kexec_verify_sig_t)(const char *kernel_buf,
140 unsigned long kernel_len);
141#endif
142
143struct kexec_file_ops {
144 kexec_probe_t *probe;
145 kexec_load_t *load;
146 kexec_cleanup_t *cleanup;
147#ifdef CONFIG_KEXEC_VERIFY_SIG
148 kexec_verify_sig_t *verify_sig;
149#endif
150};
Thiago Jung Bauermann60fe3912016-11-29 23:45:47 +1100151
152/**
153 * struct kexec_buf - parameters for finding a place for a buffer in memory
154 * @image: kexec image in which memory to search.
155 * @buffer: Contents which will be copied to the allocated memory.
156 * @bufsz: Size of @buffer.
157 * @mem: On return will have address of the buffer in memory.
158 * @memsz: Size for the buffer in memory.
159 * @buf_align: Minimum alignment needed.
160 * @buf_min: The buffer can't be placed below this address.
161 * @buf_max: The buffer can't be placed above this address.
162 * @top_down: Allocate from top of memory.
163 */
164struct kexec_buf {
165 struct kimage *image;
166 char *buffer;
167 unsigned long bufsz;
168 unsigned long mem;
169 unsigned long memsz;
170 unsigned long buf_align;
171 unsigned long buf_min;
172 unsigned long buf_max;
173 bool top_down;
174};
175
176int __weak arch_kexec_walk_mem(struct kexec_buf *kbuf,
177 int (*func)(u64, u64, void *));
178#endif /* CONFIG_KEXEC_FILE */
Xunlei Pang978e30c2016-01-20 15:00:36 -0800179
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700180struct kimage {
181 kimage_entry_t head;
182 kimage_entry_t *entry;
183 kimage_entry_t *last_entry;
184
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700185 unsigned long start;
186 struct page *control_code_page;
Huang Ying3ab83522008-07-25 19:45:07 -0700187 struct page *swap_page;
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700188
189 unsigned long nr_segments;
190 struct kexec_segment segment[KEXEC_SEGMENT_MAX];
191
192 struct list_head control_pages;
193 struct list_head dest_pages;
Vivek Goyal7d3e2bc2014-08-08 14:25:43 -0700194 struct list_head unusable_pages;
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700195
196 /* Address of next control page to allocate for crash kernels. */
197 unsigned long control_page;
198
199 /* Flags to indicate special processing */
200 unsigned int type : 1;
201#define KEXEC_TYPE_DEFAULT 0
202#define KEXEC_TYPE_CRASH 1
Huang Ying3ab83522008-07-25 19:45:07 -0700203 unsigned int preserve_context : 1;
Vivek Goyalcb105252014-08-08 14:25:57 -0700204 /* If set, we are using file mode kexec syscall */
205 unsigned int file_mode:1;
Huang Ying92be3d62008-10-31 09:48:08 +0800206
207#ifdef ARCH_HAS_KIMAGE_ARCH
208 struct kimage_arch arch;
209#endif
Vivek Goyalcb105252014-08-08 14:25:57 -0700210
Xunlei Pang978e30c2016-01-20 15:00:36 -0800211#ifdef CONFIG_KEXEC_FILE
Vivek Goyalcb105252014-08-08 14:25:57 -0700212 /* Additional fields for file based kexec syscall */
213 void *kernel_buf;
214 unsigned long kernel_buf_len;
215
216 void *initrd_buf;
217 unsigned long initrd_buf_len;
218
219 char *cmdline_buf;
220 unsigned long cmdline_buf_len;
221
222 /* File operations provided by image loader */
223 struct kexec_file_ops *fops;
224
225 /* Image loader handling the kernel can store a pointer here */
226 void *image_loader_data;
Vivek Goyal12db5562014-08-08 14:26:04 -0700227
228 /* Information for loading purgatory */
229 struct purgatory_info purgatory_info;
Xunlei Pang978e30c2016-01-20 15:00:36 -0800230#endif
Vivek Goyalcb105252014-08-08 14:25:57 -0700231};
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700232
233/* kexec interface functions */
Huang Ying3ab83522008-07-25 19:45:07 -0700234extern void machine_kexec(struct kimage *image);
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700235extern int machine_kexec_prepare(struct kimage *image);
236extern void machine_kexec_cleanup(struct kimage *image);
237extern asmlinkage long sys_kexec_load(unsigned long entry,
Maneesh Soni72414d32005-06-25 14:58:28 -0700238 unsigned long nr_segments,
239 struct kexec_segment __user *segments,
240 unsigned long flags);
Huang Ying3ab83522008-07-25 19:45:07 -0700241extern int kernel_kexec(void);
Vivek Goyalcb105252014-08-08 14:25:57 -0700242extern int kexec_add_buffer(struct kimage *image, char *buffer,
243 unsigned long bufsz, unsigned long memsz,
244 unsigned long buf_align, unsigned long buf_min,
245 unsigned long buf_max, bool top_down,
246 unsigned long *load_addr);
Maneesh Soni72414d32005-06-25 14:58:28 -0700247extern struct page *kimage_alloc_control_pages(struct kimage *image,
248 unsigned int order);
Vivek Goyal12db5562014-08-08 14:26:04 -0700249extern int kexec_load_purgatory(struct kimage *image, unsigned long min,
250 unsigned long max, int top_down,
251 unsigned long *load_addr);
252extern int kexec_purgatory_get_set_symbol(struct kimage *image,
253 const char *name, void *buf,
254 unsigned int size, bool get_value);
255extern void *kexec_purgatory_get_symbol_addr(struct kimage *image,
256 const char *name);
Hidehiro Kawai7bbee5c2015-12-14 11:19:11 +0100257extern void __crash_kexec(struct pt_regs *);
Alexander Nyberg6e274d12005-06-25 14:58:26 -0700258extern void crash_kexec(struct pt_regs *);
259int kexec_should_crash(struct task_struct *);
Petr Tesarik21db79e2016-08-02 14:06:16 -0700260int kexec_crash_loaded(void);
Magnus Damm85916f82006-12-06 20:40:41 -0800261void crash_save_cpu(struct pt_regs *regs, int cpu);
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700262void crash_save_vmcoreinfo(void);
263void arch_crash_save_vmcoreinfo(void);
Joe Perchesb9075fa2011-10-31 17:11:33 -0700264__printf(1, 2)
265void vmcoreinfo_append_str(const char *fmt, ...);
Russell Kingdae28012016-08-02 14:06:00 -0700266phys_addr_t paddr_vmcoreinfo_note(void);
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700267
Bernhard Wallec6e2bee2008-08-05 13:01:05 -0700268#define VMCOREINFO_OSRELEASE(value) \
269 vmcoreinfo_append_str("OSRELEASE=%s\n", value)
Ken'ichi Ohmichibba1f602008-02-07 00:15:22 -0800270#define VMCOREINFO_PAGESIZE(value) \
271 vmcoreinfo_append_str("PAGESIZE=%ld\n", value)
Ken'ichi Ohmichibcbba6c2007-10-16 23:27:30 -0700272#define VMCOREINFO_SYMBOL(name) \
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700273 vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
Ken'ichi Ohmichibcbba6c2007-10-16 23:27:30 -0700274#define VMCOREINFO_SIZE(name) \
Ken'ichi Ohmichid7682812007-10-16 23:27:28 -0700275 vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
Ken'ichi Ohmichi6cfa0622007-10-16 23:27:28 -0700276 (unsigned long)sizeof(name))
Ken'ichi Ohmichic76f8602008-02-07 00:15:20 -0800277#define VMCOREINFO_STRUCT_SIZE(name) \
278 vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
279 (unsigned long)sizeof(struct name))
Ken'ichi Ohmichibcbba6c2007-10-16 23:27:30 -0700280#define VMCOREINFO_OFFSET(name, field) \
Ken'ichi Ohmichid7682812007-10-16 23:27:28 -0700281 vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
Ken'ichi Ohmichi1e4f2952008-02-07 00:15:22 -0800282 (unsigned long)offsetof(struct name, field))
Ken'ichi Ohmichibcbba6c2007-10-16 23:27:30 -0700283#define VMCOREINFO_LENGTH(name, value) \
Ken'ichi Ohmichid7682812007-10-16 23:27:28 -0700284 vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value)
Ken'ichi Ohmichibcbba6c2007-10-16 23:27:30 -0700285#define VMCOREINFO_NUMBER(name) \
Ken'ichi Ohmichi6cfa0622007-10-16 23:27:28 -0700286 vmcoreinfo_append_str("NUMBER(%s)=%ld\n", #name, (long)name)
Ken'ichi Ohmichibcbba6c2007-10-16 23:27:30 -0700287#define VMCOREINFO_CONFIG(name) \
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700288 vmcoreinfo_append_str("CONFIG_%s=y\n", #name)
Thomas Garnier0549a3c2016-10-11 13:55:08 -0700289#define VMCOREINFO_PAGE_OFFSET(value) \
290 vmcoreinfo_append_str("PAGE_OFFSET=%lx\n", (unsigned long)value)
291#define VMCOREINFO_VMALLOC_START(value) \
292 vmcoreinfo_append_str("VMALLOC_START=%lx\n", (unsigned long)value)
293#define VMCOREINFO_VMEMMAP_START(value) \
294 vmcoreinfo_append_str("VMEMMAP_START=%lx\n", (unsigned long)value)
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700295
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700296extern struct kimage *kexec_image;
Jeff Moyerc330dda2006-06-23 02:05:07 -0700297extern struct kimage *kexec_crash_image;
Kees Cook79847542014-01-23 15:55:59 -0800298extern int kexec_load_disabled;
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700299
Zou Nan haia79561132006-12-07 09:51:35 -0800300#ifndef kexec_flush_icache_page
301#define kexec_flush_icache_page(page)
302#endif
303
Huang Ying3ab83522008-07-25 19:45:07 -0700304/* List of defined/legal kexec flags */
305#ifndef CONFIG_KEXEC_JUMP
306#define KEXEC_FLAGS KEXEC_ON_CRASH
307#else
308#define KEXEC_FLAGS (KEXEC_ON_CRASH | KEXEC_PRESERVE_CONTEXT)
309#endif
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700310
Vivek Goyalcb105252014-08-08 14:25:57 -0700311/* List of defined/legal kexec file flags */
312#define KEXEC_FILE_FLAGS (KEXEC_FILE_UNLOAD | KEXEC_FILE_ON_CRASH | \
313 KEXEC_FILE_NO_INITRAMFS)
314
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700315#define VMCOREINFO_BYTES (4096)
316#define VMCOREINFO_NOTE_NAME "VMCOREINFO"
317#define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4)
318#define VMCOREINFO_NOTE_SIZE (KEXEC_NOTE_HEAD_BYTES*2 + VMCOREINFO_BYTES \
319 + VMCOREINFO_NOTE_NAME_BYTES)
320
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700321/* Location of a reserved region to hold the crash kernel.
322 */
323extern struct resource crashk_res;
Yinghai Lu0212f912013-01-24 12:20:11 -0800324extern struct resource crashk_low_res;
Simon Horman6672f762007-05-08 00:28:22 -0700325typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4];
Tejun Heo43cf38e2010-02-02 14:38:57 +0900326extern note_buf_t __percpu *crash_notes;
Ken'ichi Ohmichifd59d232007-10-16 23:27:27 -0700327extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
Ken'ichi Ohmichid7682812007-10-16 23:27:28 -0700328extern size_t vmcoreinfo_size;
329extern size_t vmcoreinfo_max_size;
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700330
Khalid Aziz4fc9bbf2013-11-27 15:19:25 -0700331/* flag to track if kexec reboot is in progress */
332extern bool kexec_in_progress;
333
Bernhard Wallecba63c32007-10-18 23:40:58 -0700334int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
335 unsigned long long *crash_size, unsigned long long *crash_base);
Yinghai Lu55a20ee2013-04-15 22:23:47 -0700336int parse_crashkernel_high(char *cmdline, unsigned long long system_ram,
337 unsigned long long *crash_size, unsigned long long *crash_base);
Yinghai Lu0212f912013-01-24 12:20:11 -0800338int parse_crashkernel_low(char *cmdline, unsigned long long system_ram,
339 unsigned long long *crash_size, unsigned long long *crash_base);
Amerigo Wang06a7f712009-12-15 16:47:46 -0800340int crash_shrink_memory(unsigned long new_size);
341size_t crash_get_memory_size(void);
Anton Blanchardc0bb9e42010-08-25 10:22:58 +1000342void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);
Zou Nan haia79561132006-12-07 09:51:35 -0800343
Dave Younga43cac02015-09-09 15:38:51 -0700344int __weak arch_kexec_kernel_image_probe(struct kimage *image, void *buf,
345 unsigned long buf_len);
346void * __weak arch_kexec_kernel_image_load(struct kimage *image);
347int __weak arch_kimage_file_post_load_cleanup(struct kimage *image);
348int __weak arch_kexec_kernel_verify_sig(struct kimage *image, void *buf,
349 unsigned long buf_len);
350int __weak arch_kexec_apply_relocations_add(const Elf_Ehdr *ehdr,
351 Elf_Shdr *sechdrs, unsigned int relsec);
352int __weak arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
353 unsigned int relsec);
Xunlei Pang9b492cf2016-05-23 16:24:10 -0700354void arch_kexec_protect_crashkres(void);
355void arch_kexec_unprotect_crashkres(void);
Dave Younga43cac02015-09-09 15:38:51 -0700356
Russell King43546d82016-08-02 14:06:04 -0700357#ifndef page_to_boot_pfn
358static inline unsigned long page_to_boot_pfn(struct page *page)
359{
360 return page_to_pfn(page);
361}
362#endif
363
364#ifndef boot_pfn_to_page
365static inline struct page *boot_pfn_to_page(unsigned long boot_pfn)
366{
367 return pfn_to_page(boot_pfn);
368}
369#endif
370
371#ifndef phys_to_boot_phys
372static inline unsigned long phys_to_boot_phys(phys_addr_t phys)
373{
374 return phys;
375}
376#endif
377
378#ifndef boot_phys_to_phys
379static inline phys_addr_t boot_phys_to_phys(unsigned long boot_phys)
380{
381 return boot_phys;
382}
383#endif
384
385static inline unsigned long virt_to_boot_phys(void *addr)
386{
387 return phys_to_boot_phys(__pa((unsigned long)addr));
388}
389
390static inline void *boot_phys_to_virt(unsigned long entry)
391{
392 return phys_to_virt(boot_phys_to_phys(entry));
393}
394
Dave Young2965faa2015-09-09 15:38:55 -0700395#else /* !CONFIG_KEXEC_CORE */
Alexander Nyberg6e274d12005-06-25 14:58:26 -0700396struct pt_regs;
397struct task_struct;
Hidehiro Kawai7bbee5c2015-12-14 11:19:11 +0100398static inline void __crash_kexec(struct pt_regs *regs) { }
Alexander Nyberg6e274d12005-06-25 14:58:26 -0700399static inline void crash_kexec(struct pt_regs *regs) { }
400static inline int kexec_should_crash(struct task_struct *p) { return 0; }
Petr Tesarik21db79e2016-08-02 14:06:16 -0700401static inline int kexec_crash_loaded(void) { return 0; }
Vitaly Kuznetsov2b94ed22015-08-01 16:08:06 -0700402#define kexec_in_progress false
Dave Young2965faa2015-09-09 15:38:55 -0700403#endif /* CONFIG_KEXEC_CORE */
Geoff Levandcf2df632015-02-17 13:45:56 -0800404
405#endif /* !defined(__ASSEBMLY__) */
406
Eric W. Biedermandc009d92005-06-25 14:57:52 -0700407#endif /* LINUX_KEXEC_H */