6cd39a927e1fc80d2c92248e8c71895caf06aa91
[deliverable/linux.git] / include / linux / crash_dump.h
1 #ifndef LINUX_CRASH_DUMP_H
2 #define LINUX_CRASH_DUMP_H
3
4 #ifdef CONFIG_CRASH_DUMP
5 #include <linux/kexec.h>
6 #include <linux/smp_lock.h>
7 #include <linux/device.h>
8 #include <linux/proc_fs.h>
9
10 #define ELFCORE_ADDR_MAX (-1ULL)
11 extern unsigned long long elfcorehdr_addr;
12 extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
13 unsigned long, int);
14 extern const struct file_operations proc_vmcore_operations;
15 extern struct proc_dir_entry *proc_vmcore;
16
17 /* Architecture code defines this if there are other possible ELF
18 * machine types, e.g. on bi-arch capable hardware. */
19 #ifndef vmcore_elf_check_arch_cross
20 #define vmcore_elf_check_arch_cross(x) 0
21 #endif
22
23 #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
24
25 static inline int is_kdump_kernel(void)
26 {
27 return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0;
28 }
29 #else /* !CONFIG_CRASH_DUMP */
30 static inline int is_kdump_kernel(void) { return 0; }
31 #endif /* CONFIG_CRASH_DUMP */
32
33 extern unsigned long saved_max_pfn;
34 #endif /* LINUX_CRASHDUMP_H */
This page took 0.035421 seconds and 4 git commands to generate.