All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] towards unattended reboot
@ 2002-12-06 13:52 lamont
  2002-12-06 16:22 ` Carlos O'Donell
  0 siblings, 1 reply; 4+ messages in thread
From: lamont @ 2002-12-06 13:52 UTC (permalink / raw)
  To: parisc-linux

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(;;)
 	    ;
 }

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

end of thread, other threads:[~2002-12-06 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-06 13:52 [parisc-linux] towards unattended reboot lamont
2002-12-06 16:22 ` Carlos O'Donell
2002-12-06 16:32   ` Bruno Vidal
2002-12-06 16:42   ` LaMont Jones

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.