diff options
Diffstat (limited to 'include/linux/crash_dump.h')
-rw-r--r-- | include/linux/crash_dump.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index a992e6ca2f1c..f7ac2aa93269 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -2,13 +2,13 @@ | |||
2 | #ifndef LINUX_CRASH_DUMP_H | 2 | #ifndef LINUX_CRASH_DUMP_H |
3 | #define LINUX_CRASH_DUMP_H | 3 | #define LINUX_CRASH_DUMP_H |
4 | 4 | ||
5 | #ifdef CONFIG_CRASH_DUMP | ||
6 | #include <linux/kexec.h> | 5 | #include <linux/kexec.h> |
7 | #include <linux/proc_fs.h> | 6 | #include <linux/proc_fs.h> |
8 | #include <linux/elf.h> | 7 | #include <linux/elf.h> |
9 | 8 | ||
10 | #include <asm/pgtable.h> /* for pgprot_t */ | 9 | #include <asm/pgtable.h> /* for pgprot_t */ |
11 | 10 | ||
11 | #ifdef CONFIG_CRASH_DUMP | ||
12 | #define ELFCORE_ADDR_MAX (-1ULL) | 12 | #define ELFCORE_ADDR_MAX (-1ULL) |
13 | #define ELFCORE_ADDR_ERR (-2ULL) | 13 | #define ELFCORE_ADDR_ERR (-2ULL) |
14 | 14 | ||
@@ -52,13 +52,13 @@ void vmcore_cleanup(void); | |||
52 | * has passed the elf core header address on command line. | 52 | * has passed the elf core header address on command line. |
53 | * | 53 | * |
54 | * This is not just a test if CONFIG_CRASH_DUMP is enabled or not. It will | 54 | * This is not just a test if CONFIG_CRASH_DUMP is enabled or not. It will |
55 | * return 1 if CONFIG_CRASH_DUMP=y and if kernel is booting after a panic of | 55 | * return true if CONFIG_CRASH_DUMP=y and if kernel is booting after a panic |
56 | * previous kernel. | 56 | * of previous kernel. |
57 | */ | 57 | */ |
58 | 58 | ||
59 | static inline int is_kdump_kernel(void) | 59 | static inline bool is_kdump_kernel(void) |
60 | { | 60 | { |
61 | return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0; | 61 | return elfcorehdr_addr != ELFCORE_ADDR_MAX; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* is_vmcore_usable() checks if the kernel is booting after a panic and | 64 | /* is_vmcore_usable() checks if the kernel is booting after a panic and |
@@ -89,7 +89,7 @@ extern int register_oldmem_pfn_is_ram(int (*fn)(unsigned long pfn)); | |||
89 | extern void unregister_oldmem_pfn_is_ram(void); | 89 | extern void unregister_oldmem_pfn_is_ram(void); |
90 | 90 | ||
91 | #else /* !CONFIG_CRASH_DUMP */ | 91 | #else /* !CONFIG_CRASH_DUMP */ |
92 | static inline int is_kdump_kernel(void) { return 0; } | 92 | static inline bool is_kdump_kernel(void) { return 0; } |
93 | #endif /* CONFIG_CRASH_DUMP */ | 93 | #endif /* CONFIG_CRASH_DUMP */ |
94 | 94 | ||
95 | extern unsigned long saved_max_pfn; | 95 | extern unsigned long saved_max_pfn; |