public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Cliff Larsen <clarsen@egenera.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] make INIT# handler call panic
Date: Fri, 05 Nov 2004 13:55:43 +0000	[thread overview]
Message-ID: <1099662943.913.180.camel@clarsen> (raw)

[-- 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

             reply	other threads:[~2004-11-05 13:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 13:55 Cliff Larsen [this message]
2004-11-05 16:26 ` [PATCH] make INIT# handler call panic 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1099662943.913.180.camel@clarsen \
    --to=clarsen@egenera.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox