dead hvc_console with kdump kernel
Michael Ellerman
michael at ellerman.id.au
Thu Mar 9 10:57:02 EST 2006
On Wed, 8 Mar 2006 22:45, Olaf Hering wrote:
> On Wed, Mar 08, Michael Ellerman wrote:
> > So we take an interrupt, and while we're processing it we decide we
> > should panic, this happens for example if we panic via sysrq.
>
> You are right, sleep 2 ; echo c > /proc/sysrq-trigger ; sleep 2 gives me
> a working console.
Yep, and with this patch, my veth (irq 185) is dead in the second kernel.
Index: kdump/arch/powerpc/kernel/irq.c
===================================================================
--- kdump.orig/arch/powerpc/kernel/irq.c 2006-03-07 10:00:41.000000000 +1100
+++ kdump/arch/powerpc/kernel/irq.c 2006-03-08 17:22:44.000000000 +1100
@@ -40,6 +40,7 @@
#include <linux/timex.h>
#include <linux/config.h>
#include <linux/init.h>
+#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/irq.h>
@@ -181,6 +182,16 @@ void fixup_irqs(cpumask_t map)
}
#endif
+static u32 dodgy_hack_should_crash = 0;
+
+void dodgy_hack_init(void)
+{
+ debugfs_create_bool("dodgy_hack_should_crash",
+ S_IFREG | S_IRWXUGO | ~S_IXUGO,
+ NULL, &dodgy_hack_should_crash);
+}
+__initcall(dodgy_hack_init);
+
void do_IRQ(struct pt_regs *regs)
{
int irq;
@@ -214,6 +225,11 @@ void do_IRQ(struct pt_regs *regs)
*/
irq = ppc_md.get_irq(regs);
+ if (dodgy_hack_should_crash && irq == 185) {
+ printk("do_IRQ: got irq %d, crashing.\n", irq);
+ crash_kexec(regs);
+ }
+
if (irq >= 0) {
#ifdef CONFIG_IRQSTACKS
/* Switch to the irq stack to handle this */
More information about the Linuxppc64-dev
mailing list