Merge branch 'bkl-removal' into next
[pandora-kernel.git] / arch / powerpc / kernel / rtas.c
index 053cac1..647f3e8 100644 (file)
 #include <linux/smp.h>
 #include <linux/completion.h>
 #include <linux/cpumask.h>
+#include <linux/lmb.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
 #include <asm/hvcall.h>
-#include <asm/semaphore.h>
 #include <asm/machdep.h>
 #include <asm/firmware.h>
 #include <asm/page.h>
@@ -34,7 +34,6 @@
 #include <asm/system.h>
 #include <asm/delay.h>
 #include <asm/uaccess.h>
-#include <asm/lmb.h>
 #include <asm/udbg.h>
 #include <asm/syscalls.h>
 #include <asm/smp.h>
@@ -507,7 +506,7 @@ int rtas_error_rc(int rtas_rc)
                        break;
                default:
                        printk(KERN_ERR "%s: unexpected RTAS error %d\n",
-                                       __FUNCTION__, rtas_rc);
+                                       __func__, rtas_rc);
                        rc = -ERANGE;
                        break;
        }
@@ -638,18 +637,18 @@ void rtas_halt(void)
 /* Must be in the RMO region, so we place it here */
 static char rtas_os_term_buf[2048];
 
-void rtas_panic_msg(char *str)
-{
-       snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
-}
-
-void rtas_os_term(void)
+void rtas_os_term(char *str)
 {
        int status;
 
+       if (panic_timeout)
+               return;
+
        if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
                return;
 
+       snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
+
        do {
                status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
                                   __pa(rtas_os_term_buf));
@@ -748,7 +747,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
        /* Call function on all CPUs.  One of us will make the
         * rtas call
         */
-       if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
+       if (on_each_cpu(rtas_percpu_suspend_me, &data, 0))
                data.error = -EINVAL;
 
        wait_for_completion(&done);