[PATCH] PPC64 call ibm,os-term only if its available

From: Paul Mackerras
Date: Mon Nov 15 2004 - 00:04:20 EST

This patch is from Olaf Hering.

The rtas property 'ibm,os-term' is not available on JS20, a panic will

unable to mount root filesystem on /dev/hda
Kernel panic - not syncing: Attempted to kill init!
<0>ibm,os-term call failed -1
Rebooting in 42 seconds..

Signed-off-by: Olaf Hering <olh@xxxxxxx>
Signed-off-by: Paul Mackerras <paulus@xxxxxxxxx>

diff -purN linux-2.6.10-rc1-bk15.orig/arch/ppc64/kernel/rtas.c linux-2.6.10-rc1-bk15.ibm,os-term/arch/ppc64/kernel/rtas.c
--- linux-2.6.10-rc1-bk15.orig/arch/ppc64/kernel/rtas.c 2004-11-05 14:52:14.747905961 +0100
+++ linux-2.6.10-rc1-bk15.ibm,os-term/arch/ppc64/kernel/rtas.c 2004-11-05 23:00:10.581515367 +0100
@@ -439,6 +439,9 @@ void rtas_os_term(char *str)
int status;

+ if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
+ return;
snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);

do {
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/