9 #include <linux/device.h>
11 #include <linux/kexec.h>
13 #include <linux/reboot.h>
17 #include <asm/setup.h>
18 #include <asm/pgtable.h>
19 #include <asm/pgalloc.h>
25 #include <asm/asm-offsets.h>
33 #ifdef CONFIG_CRASH_DUMP
38 static void add_elf_notes(
int cpu)
40 struct save_area *
sa = (
void *) 4608 + store_prefix();
54 unsigned long sa =
S390_lowcore.prefixreg_save_area + SAVE_AREA_BASE;
58 add_elf_notes(this_cpu);
62 if (smp_store_status(cpu))
75 static void __do_machine_kdump(
void *
image)
77 #ifdef CONFIG_CRASH_DUMP
78 int (*start_kdump)(
int) = (
void *)((
struct kimage *) image)->start;
89 static int kdump_csum_valid(
struct kimage *image)
91 #ifdef CONFIG_CRASH_DUMP
92 int (*start_kdump)(
int) = (
void *)image->start;
107 static void crash_map_pages(
int enable)
143 static int machine_kexec_prepare_kdump(
void)
145 #ifdef CONFIG_CRASH_DUMP
157 void *reboot_code_buffer;
163 if (image->type == KEXEC_TYPE_CRASH)
164 return machine_kexec_prepare_kdump();
167 if (image->type != KEXEC_TYPE_DEFAULT)
171 reboot_code_buffer = (
void *)
page_to_phys(image->control_code_page);
200 static void __do_machine_kexec(
void *
data)
203 struct kimage *image =
data;
208 (*data_mover)(&image->head, image->start);
214 static void __machine_kexec(
void *data)
216 struct kimage *image =
data;
222 if (image->type == KEXEC_TYPE_CRASH) {
228 disabled_wait((
unsigned long) __builtin_return_address(0));
237 if (image->type == KEXEC_TYPE_CRASH && !kdump_csum_valid(image))