Переглянути джерело

[PATCH] Xmon bug fix for soft-reset

For soft reset during system hang, got an error "CPU did not take
control" for some CPUs even though they responded to soft-reset (called
SystemReset, die and called debugger - xmon).   First these CPUs entered
into xmon by IPI callback and then got a soft-reset exception and
re-entered into xmon again. The first CPU which re-entered into xmon got
the output lock and made into xmon successfully without unlocking.
Hence, the next CPU(s) which re-entered into xmon try to acquire a lock
(get_output_lock). Therefore, we can not view state of those CPU(s).

[This is a simple, very low risk, obvious fix for an obvious bug, and
should go into 2.6.13.  -- paulus]

Signed-off-by: Haren Myneni <hbabu@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Haren Myneni 20 роки тому
батько
коміт
5cb4cc0d82
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      arch/ppc64/xmon/xmon.c

+ 3 - 0
arch/ppc64/xmon/xmon.c

@@ -329,13 +329,16 @@ int xmon_core(struct pt_regs *regs, int fromipi)
 		printf("cpu 0x%x: Exception %lx %s in xmon, "
 		printf("cpu 0x%x: Exception %lx %s in xmon, "
 		       "returning to main loop\n",
 		       "returning to main loop\n",
 		       cpu, regs->trap, getvecname(TRAP(regs)));
 		       cpu, regs->trap, getvecname(TRAP(regs)));
+		release_output_lock();
 		longjmp(xmon_fault_jmp[cpu], 1);
 		longjmp(xmon_fault_jmp[cpu], 1);
 	}
 	}
 
 
 	if (setjmp(recurse_jmp) != 0) {
 	if (setjmp(recurse_jmp) != 0) {
 		if (!in_xmon || !xmon_gate) {
 		if (!in_xmon || !xmon_gate) {
+			get_output_lock();
 			printf("xmon: WARNING: bad recursive fault "
 			printf("xmon: WARNING: bad recursive fault "
 			       "on cpu 0x%x\n", cpu);
 			       "on cpu 0x%x\n", cpu);
+			release_output_lock();
 			goto waiting;
 			goto waiting;
 		}
 		}
 		secondary = !(xmon_taken && cpu == xmon_owner);
 		secondary = !(xmon_taken && cpu == xmon_owner);