linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reboot when panic_timout is set
@ 2006-08-21 16:11 Olaf Hering
  2006-08-25 18:33 ` Mike Strosaker
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2006-08-21 16:11 UTC (permalink / raw)
  To: linuxppc-dev, Paul Mackeras

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.

Signed-off-by: Olaf Hering <olh@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;
 

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

* Re: [PATCH] reboot when panic_timout is set
  2006-08-21 16:11 [PATCH] reboot when panic_timout is set Olaf Hering
@ 2006-08-25 18:33 ` Mike Strosaker
  2006-08-25 20:14   ` Olaf Hering
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Strosaker @ 2006-08-25 18:33 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras

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.

Thanks,
Mike

>Signed-off-by: Olaf Hering <olh@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@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-dev
>  
>

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

* Re: [PATCH] reboot when panic_timout is set
  2006-08-25 18:33 ` Mike Strosaker
@ 2006-08-25 20:14   ` Olaf Hering
  2006-08-30 22:13     ` Mike Strosaker
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2006-08-25 20:14 UTC (permalink / raw)
  To: Mike Strosaker; +Cc: linuxppc-dev, Paul Mackeras

On Fri, Aug 25, Mike Strosaker wrote:

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

That doesnt help me at all if the kernel crashes before it reaches
/init. And if one has to call a binary anyway to set or upgrade the
policy, this binary can also set /proc/sys/kernel/panic to 0.

Do I have to set it for each boot, or is a change permanent?

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

* Re: [PATCH] reboot when panic_timout is set
  2006-08-25 20:14   ` Olaf Hering
@ 2006-08-30 22:13     ` Mike Strosaker
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Strosaker @ 2006-08-30 22:13 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras

Olaf Hering wrote:

>On Fri, Aug 25, Mike Strosaker wrote:
>
>>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.
>>    
>>
>
>That doesnt help me at all if the kernel crashes before it reaches
>/init. And if one has to call a binary anyway to set or upgrade the
>policy, this binary can also set /proc/sys/kernel/panic to 0.
>  
>
Hmm... I thought there was a way to modify the reboot policy from SMS or 
the OF command line, but I can't find a way offhand.  I'm trying to find 
out from the firmware people here.  It used to be an NVRAM variable in 
one of the partitions visible to the OS (and so changable from OF with 
the setenv command), but that's not the case anymore; it's now modified 
by the ibm,set-system-parameter RTAS call.

>Do I have to set it for each boot, or is a change permanent?
>  
>
The change is stored in NVRAM, and thus is persistent across reboots.

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

end of thread, other threads:[~2006-08-30 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-21 16:11 [PATCH] reboot when panic_timout is set Olaf Hering
2006-08-25 18:33 ` Mike Strosaker
2006-08-25 20:14   ` Olaf Hering
2006-08-30 22:13     ` Mike Strosaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).