diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kexec.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 8c2c7fcd58ce..99f2d6f0c83a 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -121,6 +121,23 @@ extern struct page *kimage_alloc_control_pages(struct kimage *image, | |||
| 121 | extern void crash_kexec(struct pt_regs *); | 121 | extern void crash_kexec(struct pt_regs *); |
| 122 | int kexec_should_crash(struct task_struct *); | 122 | int kexec_should_crash(struct task_struct *); |
| 123 | void crash_save_cpu(struct pt_regs *regs, int cpu); | 123 | void crash_save_cpu(struct pt_regs *regs, int cpu); |
| 124 | void crash_save_vmcoreinfo(void); | ||
| 125 | void arch_crash_save_vmcoreinfo(void); | ||
| 126 | void vmcoreinfo_append_str(const char *fmt, ...); | ||
| 127 | unsigned long paddr_vmcoreinfo_note(void); | ||
| 128 | |||
| 129 | #define SYMBOL(name) \ | ||
| 130 | vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name) | ||
| 131 | #define SIZE(name) \ | ||
| 132 | vmcoreinfo_append_str("SIZE(%s)=%d\n", #name, sizeof(struct name)) | ||
| 133 | #define OFFSET(name, field) \ | ||
| 134 | vmcoreinfo_append_str("OFFSET(%s.%s)=%d\n", #name, #field, \ | ||
| 135 | &(((struct name *)0)->field)) | ||
| 136 | #define LENGTH(name, value) \ | ||
| 137 | vmcoreinfo_append_str("LENGTH(%s)=%d\n", #name, value) | ||
| 138 | #define CONFIG(name) \ | ||
| 139 | vmcoreinfo_append_str("CONFIG_%s=y\n", #name) | ||
| 140 | |||
| 124 | extern struct kimage *kexec_image; | 141 | extern struct kimage *kexec_image; |
| 125 | extern struct kimage *kexec_crash_image; | 142 | extern struct kimage *kexec_crash_image; |
| 126 | 143 | ||
| @@ -148,11 +165,20 @@ extern struct kimage *kexec_crash_image; | |||
| 148 | 165 | ||
| 149 | #define KEXEC_FLAGS (KEXEC_ON_CRASH) /* List of defined/legal kexec flags */ | 166 | #define KEXEC_FLAGS (KEXEC_ON_CRASH) /* List of defined/legal kexec flags */ |
| 150 | 167 | ||
| 168 | #define VMCOREINFO_BYTES (4096) | ||
| 169 | #define VMCOREINFO_NOTE_NAME "VMCOREINFO" | ||
| 170 | #define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4) | ||
| 171 | #define VMCOREINFO_NOTE_SIZE (KEXEC_NOTE_HEAD_BYTES*2 + VMCOREINFO_BYTES \ | ||
| 172 | + VMCOREINFO_NOTE_NAME_BYTES) | ||
| 173 | |||
| 151 | /* Location of a reserved region to hold the crash kernel. | 174 | /* Location of a reserved region to hold the crash kernel. |
| 152 | */ | 175 | */ |
| 153 | extern struct resource crashk_res; | 176 | extern struct resource crashk_res; |
| 154 | typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; | 177 | typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; |
| 155 | extern note_buf_t *crash_notes; | 178 | extern note_buf_t *crash_notes; |
| 179 | extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; | ||
| 180 | extern unsigned int vmcoreinfo_size; | ||
| 181 | extern unsigned int vmcoreinfo_max_size; | ||
| 156 | 182 | ||
| 157 | 183 | ||
| 158 | #else /* !CONFIG_KEXEC */ | 184 | #else /* !CONFIG_KEXEC */ |
