public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make INIT# handler call panic
@ 2004-11-05 13:55 Cliff Larsen
  2004-11-05 16:26 ` Bjorn Helgaas
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Cliff Larsen @ 2004-11-05 13:55 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

This is a small patch to enable a change of behavior when the INIT#
interrupt is received. By including a command line argument 
'ia64initpanic', the init_handler_platform will call panic. This 
is useful because the system is then connected to a call chain and 
machine restart. The call chain may invoke a netdump or diskdump 
routine. I think this would be useful for 2.6 as well.

Without the cmdline arg, the existing behavior is left unchanged
(printing task backtraces to the console and spinning forever).

The patch is off 2.4.27 
-- 
Cliff Larsen <clarsen@egenera.com>

[-- Attachment #2: init_handler_platform-2.4.27.patch --]
[-- Type: text/plain, Size: 1644 bytes --]

--- linux-2.4.27.orig/Documentation/kernel-parameters.txt	2004-08-07 19:26:04.000000000 -0400
+++ linux-2.4.27/Documentation/kernel-parameters.txt	2004-11-04 15:45:46.000000000 -0500
@@ -251,6 +251,10 @@
 
 	i810=		[HW,DRM]
 
+	ia64initpanic	[IA-64,KNL] Causes INIT# handler to call panic()
+			which connects to a notifier list and
+			machine_restart rather than spinning forever.
+
 	ibmmcascsi=	[HW,MCA,SCSI] IBM MicroChannel SCSI adapter.
 
 	icn=		[HW,ISDN]
--- linux-2.4.27.orig/arch/ia64/kernel/mca.c	2004-04-14 09:05:26.000000000 -0400
+++ linux-2.4.27/arch/ia64/kernel/mca.c	2004-11-04 15:45:46.000000000 -0500
@@ -425,6 +425,15 @@
 	PUT_NAT_BIT(sw->caller_unat, &pt->r30);	PUT_NAT_BIT(sw->caller_unat, &pt->r31);
 }
 
+static int ia64initpanic = 0;
+static int __init ia64initpanic_setup(char *str)
+{
+	printk(KERN_INFO "ia64: panic on INIT# interrupt\n");
+	ia64initpanic = 1;
+	return 1;
+}
+__setup("ia64initpanic", ia64initpanic_setup);
+
 static void
 init_handler_platform (pal_min_state_area_t *ms,
 		       struct pt_regs *pt, struct switch_stack *sw)
@@ -434,6 +443,13 @@
 	/* if a kernel debugger is available call it here else just dump the registers */
 
 	/*
+	 * if ia64initpanic is present on the cmdline,
+	 * panic so that we get to notifier_call_chain and restart
+	 */
+	if (ia64initpanic)
+		panic("INIT# received by processor %d", smp_processor_id());
+
+	/*
 	 * Wait for a bit.  On some machines (e.g., HP's zx2000 and zx6000, INIT can be
 	 * generated via the BMC's command-line interface, but since the console is on the
 	 * same serial line, the user will need some time to switch out of the BMC before

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-11-11 17:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-05 13:55 [PATCH] make INIT# handler call panic Cliff Larsen
2004-11-05 16:26 ` Bjorn Helgaas
2004-11-05 21:04 ` Cliff Larsen
2004-11-05 22:04 ` Bjorn Helgaas
2004-11-05 22:57 ` Cliff Larsen
2004-11-05 23:04 ` Russ Anderson
2004-11-08 12:14 ` Takao Indoh
2004-11-10 15:53 ` Philip R Auld
2004-11-11  0:55 ` Takao Indoh
2004-11-11  1:14 ` Luck, Tony
2004-11-11 17:12 ` Cliff Larsen
2004-11-11 17:18 ` Cliff Larsen
2004-11-11 17:33 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox