File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -138,19 +138,37 @@ void machine_shutdown(void)
138
138
#endif
139
139
}
140
140
141
+ /* Override the weak function in kernel/panic.c */
142
+ void crash_smp_send_stop (void )
143
+ {
144
+ static int cpus_stopped ;
145
+
146
+ /*
147
+ * This function can be called twice in panic path, but obviously
148
+ * we execute this only once.
149
+ */
150
+ if (cpus_stopped )
151
+ return ;
152
+
153
+ smp_send_stop ();
154
+ cpus_stopped = 1 ;
155
+ }
156
+
141
157
/*
142
158
* machine_crash_shutdown - Prepare to kexec after a kernel crash
143
159
*
144
160
* This function is called by crash_kexec just before machine_kexec
145
- * below and its goal is similar to machine_shutdown, but in case of
146
- * a kernel crash. Since we don't handle such cases yet, this function
147
- * is empty.
161
+ * and its goal is to shutdown non-crashing cpus and save registers.
148
162
*/
149
163
void
150
164
machine_crash_shutdown (struct pt_regs * regs )
151
165
{
166
+ local_irq_disable ();
167
+
168
+ /* shutdown non-crashing cpus */
169
+ crash_smp_send_stop ();
170
+
152
171
crash_save_cpu (regs , smp_processor_id ());
153
- machine_shutdown ();
154
172
pr_info ("Starting crashdump kernel...\n" );
155
173
}
156
174
You can’t perform that action at this time.
0 commit comments