[PATCH] reboot when panic_timout is set

Mike Strosaker strosake at austin.ibm.com
Sat Aug 26 04:33:47 EST 2006

Olaf Hering wrote:

>Only call into RTAS when booted with panic=0 because the RTAS call does not return.
>The system has to be rebooted via the HMC or via the management console right now.
>This is cumbersome and not what the default panic=180 is supposed to do.
The os-term call is supposed to indicate to the platform that it should 
follow it's abnormal OS termination policy.  I normally set my 
partitions to reboot immediately after an os-term call.  I believe that 
"/usr/sbin/serv_config -b" (installed with powerpc-utils-papr) is used 
to set that policy from the command line.

In general, I think it's best to have the OS follow the policy stored on 
the platform whenever possible.  Some systems can be configured to 
perform system administrator calls/pages, and there may be some other 
configurable options, too; it would be a shame to have a sysadmin set up 
an automatic reboot and a page, and have neither happen because he 
didn't know that the default OS policy of a three-minute reboot overrode 
the policy he just defined.


>Signed-off-by: Olaf Hering <olh at suse.de>
> arch/powerpc/kernel/rtas.c |    3 +++
> 1 file changed, 3 insertions(+)
>Index: linux-2.6.18-rc4/arch/powerpc/kernel/rtas.c
>--- linux-2.6.18-rc4.orig/arch/powerpc/kernel/rtas.c
>+++ linux-2.6.18-rc4/arch/powerpc/kernel/rtas.c
>@@ -628,6 +628,9 @@ void rtas_os_term(char *str)
> {
> 	int status;
>+	if (panic_timeout)
>+		return;
> 	if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
> 		return;
>Linuxppc-dev mailing list
>Linuxppc-dev at ozlabs.org

More information about the Linuxppc-dev mailing list