All of lore.kernel.org
 help / color / mirror / Atom feed
From: lamont@hp.com
To: parisc-linux@parisc-linux.org
Subject: [parisc-linux] towards unattended reboot
Date: Fri, 6 Dec 2002 06:52:43 -0700	[thread overview]
Message-ID: <20021206135243.GA20175@b180.mmjgroup.com> (raw)

Q: Given a 2.4.19 kernel, how do you get it to automatically reboot on crash?

A: see below.  The first one breaks the loop on dumping the stack.  The
   second part resets the machine in parisc_terminate().

thoughts?
lamont

diff -ur x/kernel-source-2.4.19-hppa/arch/parisc/kernel/traps.c kernel-source-2.4.19-hppa/arch/parisc/kernel/traps.c
--- x/kernel-source-2.4.19-hppa/arch/parisc/kernel/traps.c	2002-10-19 16:25:59.000000000 -0600
+++ kernel-source-2.4.19-hppa/arch/parisc/kernel/traps.c	2002-12-06 00:07:40.000000000 -0700
@@ -148,6 +148,11 @@
 void show_stack(struct pt_regs *regs)
 {
 #if 1
+	static int tried_stack=0;
+	if (tried_stack)
+		return;
+	tried_stack++;
+
 	/* If regs->sr[7] == 0, we are on a kernel stack */
 	if (regs->sr[7] == 0) {
 
@@ -462,6 +467,12 @@
 	 * system will shut down immediately right here. */
 	pdc_soft_power_button(0);
 	
+	{
+		static int tried_once=0;
+		if (!tried_once++)
+			__raw_writel(5,0xfffe0030);
+	}
+	
 	for(;;)
 	    ;
 }

             reply	other threads:[~2002-12-06 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 13:52 lamont [this message]
2002-12-06 16:22 ` [parisc-linux] towards unattended reboot Carlos O'Donell
2002-12-06 16:32   ` Bruno Vidal
2002-12-06 16:42   ` LaMont Jones

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=20021206135243.GA20175@b180.mmjgroup.com \
    --to=lamont@hp.com \
    --cc=parisc-linux@parisc-linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.