aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/crash.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/crash.c')
-rw-r--r--arch/ia64/kernel/crash.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index aeb79fb28f0b..1d64ef478dde 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -156,24 +156,30 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
156 if (!kdump_on_init) 156 if (!kdump_on_init)
157 return NOTIFY_DONE; 157 return NOTIFY_DONE;
158 158
159 if (val != DIE_INIT_MONARCH_ENTER && 159 if (val != DIE_INIT_MONARCH_LEAVE &&
160 val != DIE_INIT_SLAVE_ENTER && 160 val != DIE_INIT_SLAVE_LEAVE &&
161 val != DIE_INIT_MONARCH_PROCESS &&
161 val != DIE_MCA_RENDZVOUS_LEAVE && 162 val != DIE_MCA_RENDZVOUS_LEAVE &&
162 val != DIE_MCA_MONARCH_LEAVE) 163 val != DIE_MCA_MONARCH_LEAVE)
163 return NOTIFY_DONE; 164 return NOTIFY_DONE;
164 165
165 nd = (struct ia64_mca_notify_die *)args->err; 166 nd = (struct ia64_mca_notify_die *)args->err;
166 /* Reason code 1 means machine check rendezous*/ 167 /* Reason code 1 means machine check rendezvous*/
167 if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) && 168 if ((val == DIE_INIT_MONARCH_LEAVE || val == DIE_INIT_SLAVE_LEAVE
168 nd->sos->rv_rc == 1) 169 || val == DIE_INIT_MONARCH_PROCESS) && nd->sos->rv_rc == 1)
169 return NOTIFY_DONE; 170 return NOTIFY_DONE;
170 171
171 switch (val) { 172 switch (val) {
172 case DIE_INIT_MONARCH_ENTER: 173 case DIE_INIT_MONARCH_PROCESS:
174 atomic_set(&kdump_in_progress, 1);
175 *(nd->monarch_cpu) = -1;
176 break;
177 case DIE_INIT_MONARCH_LEAVE:
173 machine_kdump_on_init(); 178 machine_kdump_on_init();
174 break; 179 break;
175 case DIE_INIT_SLAVE_ENTER: 180 case DIE_INIT_SLAVE_LEAVE:
176 unw_init_running(kdump_cpu_freeze, NULL); 181 if (atomic_read(&kdump_in_progress))
182 unw_init_running(kdump_cpu_freeze, NULL);
177 break; 183 break;
178 case DIE_MCA_RENDZVOUS_LEAVE: 184 case DIE_MCA_RENDZVOUS_LEAVE:
179 if (atomic_read(&kdump_in_progress)) 185 if (atomic_read(&kdump_in_progress))
@@ -215,8 +221,10 @@ static ctl_table sys_table[] = {
215static int 221static int
216machine_crash_setup(void) 222machine_crash_setup(void)
217{ 223{
224 /* be notified before default_monarch_init_process */
218 static struct notifier_block kdump_init_notifier_nb = { 225 static struct notifier_block kdump_init_notifier_nb = {
219 .notifier_call = kdump_init_notifier, 226 .notifier_call = kdump_init_notifier,
227 .priority = 1,
220 }; 228 };
221 int ret; 229 int ret;
222 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) 230 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)