aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Wilder <dwilder@us.ibm.com>2006-06-29 18:17:30 -0400
committerPaul Mackerras <paulus@samba.org>2006-08-17 02:41:10 -0400
commiteac8392f9591b359847b8a6abb75ca60967bcecd (patch)
treeb4f834392fe4021bbace3c0f58ad01581cfd844e
parent81b73dd92b97423b8f5324a59044da478c04f4c4 (diff)
[POWERPC] Make secondary CPUs call into kdump on reset exception
In the case of a system hang, the user will invoke soft-reset to initiate the kdump boot. If xmon is enabled, the CPU(s) enter into the xmon debugger. Unfortunately, the secondary CPU(s) will return to the hung state when they exit from the debugger (returned from die() -> system_reset_exception()). This causes a problem in kdump since the hung CPU(s) will not respond to the IPI sent from kdump. This patch fixes the issue by calling crash_kexec_secondary() directly from system_reset_exception() without returning to the previous state. These secondary CPUs wait 5ms until the kdump boot is started by the primary CPU. In the case we exited from the debugger to "recover" (command 'x' in xmon) the primary and the secondary CPUs will all return from die() -> system_reset_exception() ->crash_kexec_secondary() wait 5ms, then return to the previous state. A kdump boot is not started in this case. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: David Wilder <dwilder@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/traps.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 2105767fcc57..5147175f921c 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -211,6 +211,19 @@ void system_reset_exception(struct pt_regs *regs)
211 211
212 die("System Reset", regs, SIGABRT); 212 die("System Reset", regs, SIGABRT);
213 213
214 /*
215 * Some CPUs when released from the debugger will execute this path.
216 * These CPUs entered the debugger via a soft-reset. If the CPU was
217 * hung before entering the debugger it will return to the hung
218 * state when exiting this function. This causes a problem in
219 * kdump since the hung CPU(s) will not respond to the IPI sent
220 * from kdump. To prevent the problem we call crash_kexec_secondary()
221 * here. If a kdump had not been initiated or we exit the debugger
222 * with the "exit and recover" command (x) crash_kexec_secondary()
223 * will return after 5ms and the CPU returns to its previous state.
224 */
225 crash_kexec_secondary(regs);
226
214 /* Must die if the interrupt is not recoverable */ 227 /* Must die if the interrupt is not recoverable */
215 if (!(regs->msr & MSR_RI)) 228 if (!(regs->msr & MSR_RI))
216 panic("Unrecoverable System Reset"); 229 panic("Unrecoverable System Reset");