aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/crash.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-04-04 07:43:01 -0400
committerPaul Mackerras <paulus@samba.org>2006-04-22 04:44:25 -0400
commitd6c1a9081080c6c4658acf2a06d851feb2855933 (patch)
treeeaf1095adbe057846485de066561327066ab9bb1 /arch/powerpc/kernel/crash.c
parent4d6c58899c1cdac018f92cfa0383bb835a0c80ef (diff)
[PATCH] powerpc: Disable and EOI interrupts in machine_crash_shutdown()
We've seen several bugs caused by interrupt weirdness in the kdump kernel. Panicking from an interrupt handler means we fail to EOI the interrupt, and so the second kernel never gets that interrupt ever again. We also see hangs on JS20 where we take interrupts in the second kernel early during boot. This patch fixes both those problems, and although it adds more code to the crash path I think it is the best solution. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/crash.c')
-rw-r--r--arch/powerpc/kernel/crash.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 778f22fd85d2..dbcb85994f46 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -22,6 +22,7 @@
22#include <linux/elf.h> 22#include <linux/elf.h>
23#include <linux/elfcore.h> 23#include <linux/elfcore.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/irq.h>
25#include <linux/types.h> 26#include <linux/types.h>
26 27
27#include <asm/processor.h> 28#include <asm/processor.h>
@@ -174,6 +175,8 @@ static void crash_kexec_prepare_cpus(void)
174 175
175void default_machine_crash_shutdown(struct pt_regs *regs) 176void default_machine_crash_shutdown(struct pt_regs *regs)
176{ 177{
178 unsigned int irq;
179
177 /* 180 /*
178 * This function is only called after the system 181 * This function is only called after the system
179 * has paniced or is otherwise in a critical state. 182 * has paniced or is otherwise in a critical state.
@@ -186,6 +189,16 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
186 */ 189 */
187 local_irq_disable(); 190 local_irq_disable();
188 191
192 for_each_irq(irq) {
193 struct irq_desc *desc = irq_descp(irq);
194
195 if (desc->status & IRQ_INPROGRESS)
196 desc->handler->end(irq);
197
198 if (!(desc->status & IRQ_DISABLED))
199 desc->handler->disable(irq);
200 }
201
189 if (ppc_md.kexec_cpu_down) 202 if (ppc_md.kexec_cpu_down)
190 ppc_md.kexec_cpu_down(1, 0); 203 ppc_md.kexec_cpu_down(1, 0);
191 204