aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/crash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 341d8af6f33e..7ced58dacb12 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -347,10 +347,12 @@ int crash_shutdown_unregister(crash_shutdown_t handler)
347EXPORT_SYMBOL(crash_shutdown_unregister); 347EXPORT_SYMBOL(crash_shutdown_unregister);
348 348
349static unsigned long crash_shutdown_buf[JMP_BUF_LEN]; 349static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
350static int crash_shutdown_cpu = -1;
350 351
351static int handle_fault(struct pt_regs *regs) 352static int handle_fault(struct pt_regs *regs)
352{ 353{
353 longjmp(crash_shutdown_buf, 1); 354 if (crash_shutdown_cpu == smp_processor_id())
355 longjmp(crash_shutdown_buf, 1);
354 return 0; 356 return 0;
355} 357}
356 358
@@ -391,6 +393,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
391 */ 393 */
392 old_handler = __debugger_fault_handler; 394 old_handler = __debugger_fault_handler;
393 __debugger_fault_handler = handle_fault; 395 __debugger_fault_handler = handle_fault;
396 crash_shutdown_cpu = smp_processor_id();
394 for (i = 0; crash_shutdown_handles[i]; i++) { 397 for (i = 0; crash_shutdown_handles[i]; i++) {
395 if (setjmp(crash_shutdown_buf) == 0) { 398 if (setjmp(crash_shutdown_buf) == 0) {
396 /* 399 /*
@@ -404,6 +407,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
404 asm volatile("sync; isync"); 407 asm volatile("sync; isync");
405 } 408 }
406 } 409 }
410 crash_shutdown_cpu = -1;
407 __debugger_fault_handler = old_handler; 411 __debugger_fault_handler = old_handler;
408 412
409 /* 413 /*