15 #include <linux/kexec.h>
16 #include <linux/elfcore.h>
17 #include <linux/sysctl.h>
26 static int kdump_freeze_monarch;
27 static int kdump_on_init = 1;
28 static int kdump_on_fatal_mca = 1;
35 note->n_namesz =
strlen(name) + 1;
38 buf += (
sizeof(*note) + 3)/4;
39 memcpy(buf, name, note->n_namesz);
40 buf += (note->n_namesz + 3)/4;
41 memcpy(buf, data, data_len);
42 buf += (data_len + 3)/4;
60 unsigned long cfm, sof, sol;
66 memset(prstatus, 0,
sizeof(*prstatus));
71 sol = (cfm >> 7) & 0x7f;
73 dst[46] = (
unsigned long)ia64_rse_skip_regs((
unsigned long *)dst[46],
79 buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME,
NT_PRSTATUS, prstatus,
86 kdump_wait_cpu_freeze(
void)
90 while(timeout-- > 0) {
140 if (kdump_wait_cpu_freeze()) {
143 kdump_wait_cpu_freeze();
149 machine_kdump_on_init(
void)
185 if (!kdump_freeze_monarch)
196 if (!kdump_on_init && !kdump_on_fatal_mca)
202 "%s: kdump not configured\n",
217 if (kdump_on_init && (nd->
sos->rv_rc != 1)) {
219 kdump_freeze_monarch = 1;
224 if (kdump_on_init && (nd->
sos->rv_rc != 1))
225 machine_kdump_on_init();
229 if (kdump_on_fatal_mca && !(*(nd->
data))) {
231 machine_kdump_on_init();
243 .data = &kdump_on_init,
244 .maxlen =
sizeof(
int),
249 .procname =
"kdump_on_fatal_mca",
250 .data = &kdump_on_fatal_mca,
251 .maxlen =
sizeof(
int),
262 .child = kdump_ctl_table,
269 machine_crash_setup(
void)