diff options
author | Anton Blanchard <anton@samba.org> | 2010-02-18 07:11:51 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-04-07 04:00:48 -0400 |
commit | e9bbc8cde0e3c33b42ddbe1b02108cb5c97275eb (patch) | |
tree | 3aa22b3930273bdae0647ba254d361175e245f28 /arch/powerpc/kernel/rtas.c | |
parent | 27f10907b7cca57df5e2a9c94c14354dd1b7879d (diff) |
powerpc/pseries: Call ibm,os-term if the ibm,extended-os-term is present
We have had issues in the past with ibm,os-term initiating shutdown of a
partition. This is confusing to the user, especially if panic_timeout is
non zero.
The temporary fix was to avoid calling ibm,os-term if a panic_timeout was set
and since we set it on every boot we basically never call ibm,os-term.
An extended version of ibm,os-term has since been implemented which gives us
the behaviour we want:
"When the platform supports extended ibm,os-term behavior, the return to the
RTAS will always occur unless there is a kernel assisted dump active as
initiated by an ibm,configure-kernel-dump call."
This patch checks for the ibm,extended-os-term property and calls ibm,os-term
if it exists.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 74367841615a..0e1ec6f746f6 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -691,10 +691,14 @@ void rtas_os_term(char *str) | |||
691 | { | 691 | { |
692 | int status; | 692 | int status; |
693 | 693 | ||
694 | if (panic_timeout) | 694 | /* |
695 | return; | 695 | * Firmware with the ibm,extended-os-term property is guaranteed |
696 | 696 | * to always return from an ibm,os-term call. Earlier versions without | |
697 | if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) | 697 | * this property may terminate the partition which we want to avoid |
698 | * since it interferes with panic_timeout. | ||
699 | */ | ||
700 | if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term") || | ||
701 | RTAS_UNKNOWN_SERVICE == rtas_token("ibm,extended-os-term")) | ||
698 | return; | 702 | return; |
699 | 703 | ||
700 | snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); | 704 | snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); |
@@ -705,8 +709,7 @@ void rtas_os_term(char *str) | |||
705 | } while (rtas_busy_delay(status)); | 709 | } while (rtas_busy_delay(status)); |
706 | 710 | ||
707 | if (status != 0) | 711 | if (status != 0) |
708 | printk(KERN_EMERG "ibm,os-term call failed %d\n", | 712 | printk(KERN_EMERG "ibm,os-term call failed %d\n", status); |
709 | status); | ||
710 | } | 713 | } |
711 | 714 | ||
712 | static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; | 715 | static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; |