diff options
Diffstat (limited to 'include/linux/crash_dump.h')
-rw-r--r-- | include/linux/crash_dump.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 22c7ac5cd80c..025e4f575103 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -8,7 +8,13 @@ | |||
8 | #include <linux/proc_fs.h> | 8 | #include <linux/proc_fs.h> |
9 | 9 | ||
10 | #define ELFCORE_ADDR_MAX (-1ULL) | 10 | #define ELFCORE_ADDR_MAX (-1ULL) |
11 | |||
12 | #ifdef CONFIG_PROC_VMCORE | ||
11 | extern unsigned long long elfcorehdr_addr; | 13 | extern unsigned long long elfcorehdr_addr; |
14 | #else | ||
15 | static const unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
16 | #endif | ||
17 | |||
12 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, | 18 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, |
13 | unsigned long, int); | 19 | unsigned long, int); |
14 | extern const struct file_operations proc_vmcore_operations; | 20 | extern const struct file_operations proc_vmcore_operations; |
@@ -22,5 +28,13 @@ extern struct proc_dir_entry *proc_vmcore; | |||
22 | 28 | ||
23 | #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) | 29 | #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) |
24 | 30 | ||
31 | static inline int is_kdump_kernel(void) | ||
32 | { | ||
33 | return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0; | ||
34 | } | ||
35 | #else /* !CONFIG_CRASH_DUMP */ | ||
36 | static inline int is_kdump_kernel(void) { return 0; } | ||
25 | #endif /* CONFIG_CRASH_DUMP */ | 37 | #endif /* CONFIG_CRASH_DUMP */ |
38 | |||
39 | extern unsigned long saved_max_pfn; | ||
26 | #endif /* LINUX_CRASHDUMP_H */ | 40 | #endif /* LINUX_CRASHDUMP_H */ |